@@ -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
8590describe ( 'react' , async ( ) => {
0 commit comments