Do not test file modes on Windows

This commit is contained in:
Koen Vlaswinkel
2023-12-19 15:18:35 +01:00
parent a80098d7df
commit be4059864e

View File

@@ -166,8 +166,11 @@ async function expectFile(
) {
const file = await open(filePath, "r");
const stats = await file.stat();
expect(stats.mode).toEqual(expectedMode);
// Windows doesn't really support file modes
if (process.platform !== "win32") {
const stats = await file.stat();
expect(stats.mode).toEqual(expectedMode);
}
const contents = await file.readFile();