import assert from "node:assert/strict"; import { Then, When } from "@cucumber/cucumber"; import request from "supertest"; import type { CustomWorld } from "../support/world.js"; When("I send a GET request to {string}", async function (this: CustomWorld, path: string) { this.response = await request(this.app).get(path); }); Then("the response status should be {int}", function (this: CustomWorld, status: number) { assert.equal(this.response.status, status); }); Then("the response body should be:", function (this: CustomWorld, expectedJson: string) { assert.deepEqual(this.response.body, JSON.parse(expectedJson)); });