summaryrefslogtreecommitdiff
path: root/type-parser/features/steps/custom-type.js
diff options
context:
space:
mode:
authorEugen Wissner <belka@caraus.de>2025-07-16 16:39:09 +0200
committerEugen Wissner <belka@caraus.de>2025-07-16 16:39:09 +0200
commitdecd8e9e3d98d79b33c56e1c1a53e11fb5047c4a (patch)
tree70e4c86900f0a2363036d47f440e3269ecff02fb /type-parser/features/steps/custom-type.js
parentef41c7d7884fa4fae8b6eba53d8fab0f584a97cf (diff)
downloadcucumber-js-demo-decd8e9e3d98d79b33c56e1c1a53e11fb5047c4a.tar.gz
Use node assertions as standard solution
Diffstat (limited to 'type-parser/features/steps/custom-type.js')
-rw-r--r--type-parser/features/steps/custom-type.js10
1 files changed, 5 insertions, 5 deletions
diff --git a/type-parser/features/steps/custom-type.js b/type-parser/features/steps/custom-type.js
index 28f44aa..4c4625f 100644
--- a/type-parser/features/steps/custom-type.js
+++ b/type-parser/features/steps/custom-type.js
@@ -1,5 +1,5 @@
import { Before, Given, When, Then, defineParameterType } from '@cucumber/cucumber'
-import { expect } from 'chai'
+import assert from 'node:assert/strict'
defineParameterType({
name: 'tobe',
@@ -14,11 +14,11 @@ When('I interpret "to be" as a type', function () {
})
Then('true {tobe} true', function (predicate) {
- expect(predicate).to.be.true
+ assert(predicate)
})
Then('false {tobe} true', function (predicate) {
- expect(predicate).to.be.false
+ assert(!predicate)
})
defineParameterType({
@@ -32,7 +32,7 @@ When('a date {date} is given', function (dateString) {
})
Then('it gets converted to a Date object', function () {
- expect(this.date).to.be.an.instanceof(Date)
+ assert(this.date instanceof Date)
})
Before(function () {
@@ -44,5 +44,5 @@ Given(/(a regular expression|it) matches (this|that) pattern/, function (_x, _y)
})
Then('the step definition should be called twice', function () {
- expect(this.count).to.equal(2)
+ assert.equal(this.count, 2)
})