Skip to content

Commit 021b27f

Browse files
committed
good job windows
1 parent 8c85564 commit 021b27f

File tree

1 file changed

+20
-15
lines changed

1 file changed

+20
-15
lines changed

tests/integration/directive/index.test.ts

Lines changed: 20 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -64,22 +64,27 @@ 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-
71-
test('shebang at the beginning', async () => {
72-
const filePath = entryFiles.esm0!;
73-
const fileStats = fs.statSync(filePath);
74-
expect(fileStats.mode).toBe(mode);
75-
});
67+
describe(
68+
'chmod',
69+
async () => {
70+
test('shebang at the beginning', async () => {
71+
const filePath = entryFiles.esm0!;
72+
const fileStats = fs.statSync(filePath);
73+
expect(fileStats.mode).toBe(0o100755);
74+
});
7675

77-
test('shebang at the beginning even if minified', async () => {
78-
const filePath = entryFiles.esm1!;
79-
const fileStats = fs.statSync(filePath);
80-
expect(fileStats.mode).toBe(mode);
81-
});
82-
});
76+
test('shebang at the beginning even if minified', async () => {
77+
const filePath = entryFiles.esm1!;
78+
const fileStats = fs.statSync(filePath);
79+
expect(fileStats.mode).toBe(0o100755);
80+
});
81+
},
82+
{
83+
// Windows uses Access Control Lists (ACLs) for file permissions, which are represented differently from Linux modes.
84+
// The mode in CI is not stable on Windows, it might be 100644, 100666 and others probably.
85+
only: os.platform() !== 'win32',
86+
},
87+
);
8388
});
8489

8590
describe('react', async () => {

0 commit comments

Comments
 (0)