Use node assertions as standard solution
This commit is contained in:
@@ -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)
|
||||
})
|
||||
|
1215
type-parser/package-lock.json
generated
1215
type-parser/package-lock.json
generated
File diff suppressed because it is too large
Load Diff
@@ -9,10 +9,7 @@
|
||||
},
|
||||
"author": "Eugen Wissner <belka@caraus.de>",
|
||||
"license": "MPL-2.0",
|
||||
"devDependencies": {
|
||||
"chai": "^5.1.2"
|
||||
},
|
||||
"dependencies": {
|
||||
"@cucumber/cucumber": "^11.1.1"
|
||||
"@cucumber/cucumber": "^12.0.0"
|
||||
}
|
||||
}
|
||||
|
Reference in New Issue
Block a user