diff options
Diffstat (limited to 'async/features')
| -rw-r--r-- | async/features/steps/request.js | 6 | ||||
| -rw-r--r-- | async/features/support/hooks.js | 11 |
2 files changed, 7 insertions, 10 deletions
diff --git a/async/features/steps/request.js b/async/features/steps/request.js index 92879d3..99e7476 100644 --- a/async/features/steps/request.js +++ b/async/features/steps/request.js @@ -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) }) diff --git a/async/features/support/hooks.js b/async/features/support/hooks.js index 00ac749..de7c41a 100644 --- a/async/features/support/hooks.js +++ b/async/features/support/hooks.js @@ -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 () { |
