@@ -732,7 +732,7 @@ describe('renameDefault', () => {
732
732
733
733
describe ( 'test behavior for new file' , ( ) => {
734
734
before ( ( ) => {
735
- fs . writeFileSync ( testFilePath ( './no-unused-modules/file-added-0.js' ) , '' , { encoding : 'utf8' } ) ;
735
+ fs . writeFileSync ( testFilePath ( './no-unused-modules/file-added-0.js' ) , '' , { encoding : 'utf8' , flag : 'w' } ) ;
736
736
} ) ;
737
737
738
738
// add import in newly created file
@@ -840,7 +840,7 @@ describe('test behavior for new file', () => {
840
840
841
841
describe ( 'test behavior for new file' , ( ) => {
842
842
before ( ( ) => {
843
- fs . writeFileSync ( testFilePath ( './no-unused-modules/file-added-1.js' ) , '' , { encoding : 'utf8' } ) ;
843
+ fs . writeFileSync ( testFilePath ( './no-unused-modules/file-added-1.js' ) , '' , { encoding : 'utf8' , flag : 'w' } ) ;
844
844
} ) ;
845
845
ruleTester . run ( 'no-unused-modules' , rule , {
846
846
valid : [
@@ -875,7 +875,7 @@ describe('test behavior for new file', () => {
875
875
876
876
describe ( 'test behavior for new file' , ( ) => {
877
877
before ( ( ) => {
878
- fs . writeFileSync ( testFilePath ( './no-unused-modules/file-added-2.js' ) , '' , { encoding : 'utf8' } ) ;
878
+ fs . writeFileSync ( testFilePath ( './no-unused-modules/file-added-2.js' ) , '' , { encoding : 'utf8' , flag : 'w' } ) ;
879
879
} ) ;
880
880
ruleTester . run ( 'no-unused-modules' , rule , {
881
881
valid : [
@@ -901,7 +901,7 @@ describe('test behavior for new file', () => {
901
901
902
902
describe ( 'test behavior for new file' , ( ) => {
903
903
before ( ( ) => {
904
- fs . writeFileSync ( testFilePath ( './no-unused-modules/file-added-3.js' ) , '' , { encoding : 'utf8' } ) ;
904
+ fs . writeFileSync ( testFilePath ( './no-unused-modules/file-added-3.js' ) , '' , { encoding : 'utf8' , flag : 'w' } ) ;
905
905
} ) ;
906
906
ruleTester . run ( 'no-unused-modules' , rule , {
907
907
valid : [
@@ -952,7 +952,7 @@ describe('test behavior for destructured exports', () => {
952
952
953
953
describe ( 'test behavior for new file' , ( ) => {
954
954
before ( ( ) => {
955
- fs . writeFileSync ( testFilePath ( './no-unused-modules/file-added-4.js.js' ) , '' , { encoding : 'utf8' } ) ;
955
+ fs . writeFileSync ( testFilePath ( './no-unused-modules/file-added-4.js.js' ) , '' , { encoding : 'utf8' , flag : 'w' } ) ;
956
956
} ) ;
957
957
ruleTester . run ( 'no-unused-modules' , rule , {
958
958
valid : [
0 commit comments