Skip to content

Commit 2eafa04

Browse files
committed
change mocking strategy
1 parent 526fa1d commit 2eafa04

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

__tests__/all.test.ts

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -24,12 +24,13 @@ let precompileSpy: Mock;
2424

2525
async function mockTemplateCompiler(importOriginal: () => Promise<EmberTemplateCompiler>) {
2626
const mod = await importOriginal();
27-
precompileSpy = vi.spyOn(mod, 'precompile');
27+
precompileSpy = vi.fn(mod.precompile);
2828
return {
2929
// the plugin probes for the existence of this, and if we don't stick a key
3030
// here Vitest injects a failure
3131
default: null,
3232
...mod,
33+
precompile: precompileSpy,
3334
};
3435
}
3536

0 commit comments

Comments
 (0)