import assert from "node:assert/strict"; import { Then } from "@cucumber/cucumber"; import type { CustomWorld } from "../support/world.js"; Then( "the reference list response should include {string}", function (this: CustomWorld, name: string) { const names = (this.response.body as Array<{ name: string }>).map((item) => item.name); assert.ok(names.includes(name), `expected ${JSON.stringify(names)} to include "${name}"`); }, );