Fix unit tests

This commit is contained in:
Sander Declerck 2025-10-23 10:52:03 +02:00
parent 8447d3cac5
commit c74c23b0ff
No known key found for this signature in database
2 changed files with 8 additions and 1 deletions

View file

@ -33,6 +33,12 @@ describe("safeSpawn", () => {
},
});
mock.module("os", {
namedExports: {
platform: () => "win32",
},
});
// Import after mocking
const safeSpawnModule = await import("./safeSpawn.js");
safeSpawn = safeSpawnModule.safeSpawn;