fix(test): restore real executor module in auto-slash-command-leak afterAll

mock.module('./executor') in auto-slash-command-leak.test.ts was leaking
into executor-resolution.test.ts in the same CI batch run, causing
executeSlashCommand to return the mock's raw replacement instead of the
real resolution result.

Fix: re-register the real executor exports via mock.module() in afterAll
so subsequent test files in the batch get the real implementation.
This commit is contained in:
YeonGyu-Kim
2026-04-04 17:04:26 +09:00
parent eb4060d739
commit 8fb22b89cf
@@ -19,8 +19,12 @@ mock.module("./executor", () => ({
executeSlashCommand: executeSlashCommandMock,
}))
afterAll(() => {
afterAll(async () => {
mock.restore()
// Restore the real executor module so subsequent test files in the same batch
// (e.g. executor-resolution.test.ts) don't get the mocked version
const realExecutor = await import("./executor")
mock.module("./executor", () => realExecutor)
})
const logMock = spyOn(shared, "log").mockImplementation(() => {})