Skip to content

Commit db310bd

Browse files
committed
good job windows
1 parent 8c85564 commit db310bd

File tree

1 file changed

+5
-6
lines changed

1 file changed

+5
-6
lines changed

tests/integration/directive/index.test.ts

Lines changed: 5 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -64,20 +64,19 @@ describe('shebang', async () => {
6464
});
6565
});
6666

67-
describe('chmod', async () => {
68-
// Windows uses Access Control Lists (ACLs) for file permissions, which are represented differently from Linux modes.
69-
const mode = os.platform() === 'win32' ? 0o100644 : 0o100755;
70-
67+
// Windows uses Access Control Lists (ACLs) for file permissions, which are represented differently from Linux modes.
68+
// The mode in CI is not stable on Windows, it might be 100644, 100666 and others probably.
69+
describe.runIf(os.platform() !== 'win32')('chmod', async () => {
7170
test('shebang at the beginning', async () => {
7271
const filePath = entryFiles.esm0!;
7372
const fileStats = fs.statSync(filePath);
74-
expect(fileStats.mode).toBe(mode);
73+
expect(fileStats.mode).toBe(0o100755);
7574
});
7675

7776
test('shebang at the beginning even if minified', async () => {
7877
const filePath = entryFiles.esm1!;
7978
const fileStats = fs.statSync(filePath);
80-
expect(fileStats.mode).toBe(mode);
79+
expect(fileStats.mode).toBe(0o100755);
8180
});
8281
});
8382
});

0 commit comments

Comments
 (0)