This commit is contained in:
Fang-Pen Lin
2025-11-13 09:22:02 -08:00
parent 907cdd94c5
commit 668abeb47b
@@ -34,7 +34,9 @@ export const registerBddNockRouter = async (server: FastifyZodProvider) => {
logger.info(definitions, "Defining nock"); logger.info(definitions, "Defining nock");
nock.define(definitions as Definition[]); nock.define(definitions as Definition[]);
// Ensure we are activating the nocks, because we could have called `nock.restore()` before this call. // Ensure we are activating the nocks, because we could have called `nock.restore()` before this call.
nock.activate(); if (!nock.isActive()) {
nock.activate();
}
return { status: "ok" }; return { status: "ok" };
} }
}); });