@@ -20,13 +20,13 @@ describe("SimpleFs", () => {
20
20
test ( "non-existent file" , ( ) => {
21
21
const fileName = "fake-file-that-does-not-exist.txt" ;
22
22
expect ( ( ) => simpleFs . readFile ( fileName ) ) . toThrowError (
23
- `ENOENT: no such file or directory, open '${ fileName } `
23
+ `ENOENT: no such file or directory, open '${ fileName } ` ,
24
24
) ;
25
25
} ) ;
26
26
27
27
test ( "directory fails" , ( ) => {
28
28
expect ( ( ) => simpleFs . readFile ( "." ) ) . toThrowError (
29
- "EISDIR: illegal operation on a directory, read"
29
+ "EISDIR: illegal operation on a directory, read" ,
30
30
) ;
31
31
} ) ;
32
32
@@ -43,7 +43,7 @@ describe("SimpleFs", () => {
43
43
describe ( "writeFile" , ( ) => {
44
44
test ( "writing to directory fails" , ( ) => {
45
45
expect ( ( ) => simpleFs . writeFile ( tempDir , "anything" ) ) . toThrow (
46
- `EISDIR: illegal operation on a directory, open '${ tempDir } '`
46
+ `EISDIR: illegal operation on a directory, open '${ tempDir } '` ,
47
47
) ;
48
48
} ) ;
49
49
@@ -81,14 +81,14 @@ describe("SimpleFs", () => {
81
81
test ( "non-existent directory" , ( ) => {
82
82
const directory = "fake-directory-that-does-not-exist" ;
83
83
expect ( ( ) => simpleFs . listFiles ( directory ) ) . toThrowError (
84
- `ENOENT: no such file or directory, scandir '${ directory } '`
84
+ `ENOENT: no such file or directory, scandir '${ directory } '` ,
85
85
) ;
86
86
} ) ;
87
87
88
88
test ( "file fails" , ( ) => {
89
89
const fileName = "package.json" ;
90
90
expect ( ( ) => simpleFs . listFiles ( fileName ) ) . toThrowError (
91
- `ENOTDIR: not a directory, scandir '${ fileName } '`
91
+ `ENOTDIR: not a directory, scandir '${ fileName } '` ,
92
92
) ;
93
93
} ) ;
94
94
@@ -106,7 +106,7 @@ describe("SimpleFs", () => {
106
106
".gitignore" , // Hidden file
107
107
"src/index.ts" , // In directory
108
108
"src/__tests__/simple-fs-test.ts" , // Deep file in directory
109
- ] )
109
+ ] ) ,
110
110
) ;
111
111
112
112
// Don't include folders, just files
@@ -126,7 +126,7 @@ describe("SimpleFs", () => {
126
126
const file = path . join ( tempDir , "file.txt" ) ;
127
127
simpleFs . writeFile ( file , "contents" ) ;
128
128
expect ( ( ) => simpleFs . createFolder ( file ) ) . toThrow (
129
- `EEXIST: file already exists, mkdir '${ file } '`
129
+ `EEXIST: file already exists, mkdir '${ file } '` ,
130
130
) ;
131
131
} ) ;
132
132
@@ -154,7 +154,7 @@ describe("SimpleFs", () => {
154
154
expect ( simpleFs . readFile ( file ) . toString ( ) ) . toEqual ( contents ) ;
155
155
simpleFs . deleteFolder ( file ) ;
156
156
expect ( ( ) => simpleFs . readFile ( file ) . toString ( ) ) . toThrow (
157
- `ENOENT: no such file or directory, open '${ file } `
157
+ `ENOENT: no such file or directory, open '${ file } ` ,
158
158
) ;
159
159
} ) ;
160
160
@@ -168,10 +168,10 @@ describe("SimpleFs", () => {
168
168
expect ( simpleFs . readFile ( file ) . toString ( ) ) . toEqual ( contents ) ;
169
169
simpleFs . deleteFolder ( folder ) ;
170
170
expect ( ( ) => simpleFs . readFile ( file ) . toString ( ) ) . toThrow (
171
- `ENOENT: no such file or directory, open '${ file } `
171
+ `ENOENT: no such file or directory, open '${ file } ` ,
172
172
) ;
173
173
expect ( ( ) => simpleFs . listFiles ( folder ) . toString ( ) ) . toThrow (
174
- `ENOENT: no such file or directory, scandir '${ folder } `
174
+ `ENOENT: no such file or directory, scandir '${ folder } ` ,
175
175
) ;
176
176
} ) ;
177
177
} ) ;
0 commit comments