import assert from "node:assert/strict"; import { Then, When } from "@cucumber/cucumber"; import type { CustomWorld } from "../support/world.js"; When("I rename my household to {string}", async function (this: CustomWorld, name: string) { this.response = await this.agent.patch("/house/current").send({ name }); }); Then("my household should be named {string}", async function (this: CustomWorld, name: string) { const res = await this.agent.get("/house/current"); assert.equal(res.body.name, name); });