Use node assertions as standard solution
This commit is contained in:
@@ -1,5 +1,5 @@
|
||||
import { Given, When, Then } from '@cucumber/cucumber'
|
||||
import { expect } from 'chai'
|
||||
import assert from 'node:assert/strict'
|
||||
import axios from 'axios'
|
||||
|
||||
When('I request the same resource three times', function () {
|
||||
@@ -20,10 +20,10 @@ When('I request the same resource three times', function () {
|
||||
})
|
||||
|
||||
Then('the responses should be the same', function () {
|
||||
expect(this.first).to.equal(this.second)
|
||||
assert.equal(this.first, this.second)
|
||||
|
||||
if (this.third === undefined) {
|
||||
return
|
||||
}
|
||||
expect(this.second).to.equal(this.third)
|
||||
assert.equal(this.second, this.third)
|
||||
})
|
||||
|
@@ -1,16 +1,13 @@
|
||||
import { BeforeAll, AfterAll } from '@cucumber/cucumber'
|
||||
import express from 'express'
|
||||
import { createServer } from 'node:http'
|
||||
|
||||
let server
|
||||
|
||||
BeforeAll(function () {
|
||||
const app = express()
|
||||
|
||||
app.get('/', (req, res) => {
|
||||
res.send('Alea iacta est')
|
||||
server = createServer(function (request, response) {
|
||||
response.end('Alea iacta est')
|
||||
})
|
||||
|
||||
server = app.listen(8080)
|
||||
server.listen(8080)
|
||||
})
|
||||
|
||||
AfterAll(function () {
|
||||
|
1781
async/package-lock.json
generated
1781
async/package-lock.json
generated
File diff suppressed because it is too large
Load Diff
@@ -10,9 +10,7 @@
|
||||
"author": "Eugen Wissner <belka@caraus.de>",
|
||||
"license": "MPL-2.0",
|
||||
"dependencies": {
|
||||
"@cucumber/cucumber": "^11.1.1",
|
||||
"axios": "^1.7.9",
|
||||
"chai": "^5.1.2",
|
||||
"express": "^4.16.4"
|
||||
"@cucumber/cucumber": "^12.0.0",
|
||||
"axios": "^1.7.9"
|
||||
}
|
||||
}
|
||||
|
Reference in New Issue
Block a user