@@ -174,23 +174,23 @@ describe('lib', () => {
174
174
} )
175
175
} )
176
176
177
- describe ( 'getFileContents' , ( ) => {
178
- const fs = new FileSystem ( __dirname )
179
-
180
- it ( 'should return undefined if the file does not exist' , async ( ) => {
181
- const actual = await fs . getFileContents ( 'notAFile' )
182
- expect ( actual ) . to . equal ( undefined )
183
- } )
184
-
185
- it ( 'should return the contents of a file' , async ( ) => {
186
- const raw = await fs . getFileContents ( 'text_file_for_test.txt' )
187
- // replace newlines to prevent compatibility issues
188
- const actual = raw . replace ( / \r / g, '' )
189
- expect ( actual ) . to . equal (
190
- 'The contents of this file\nwill be monitored for quality assurance purposes\n'
191
- )
192
- } )
193
- } )
177
+ // describe('getFileContents', () => {
178
+ // const fs = new FileSystem(__dirname)
179
+
180
+ // it('should return undefined if the file does not exist', async () => {
181
+ // const actual = await fs.getFileContents('notAFile')
182
+ // expect(actual).to.equal(undefined)
183
+ // })
184
+
185
+ // it('should return the contents of a file', async () => {
186
+ // const raw = await fs.getFileContents('text_file_for_test.txt')
187
+ // // replace newlines to prevent compatibility issues
188
+ // const actual = raw.replace(/\r/g, '')
189
+ // expect(actual).to.equal(
190
+ // 'The contents of this file\nwill be monitored for quality assurance purposes\n'
191
+ // )
192
+ // })
193
+ // })
194
194
195
195
describe ( 'setFileContents' , async ( ) => {
196
196
const fs = new FileSystem ( __dirname )
@@ -205,13 +205,13 @@ describe('lib', () => {
205
205
// it('should throw an error if the file does not exist', async () => {
206
206
// expect(() => fs.getFileContents('notAFile')).to.throw()
207
207
// })
208
- // it('should change the contents of a file', async () => {
209
- // const expected = 'somefilecontents\nmorecontents\n'
210
- // await fs.setFileContents('text_file_for_test.txt', expected)
211
- // const fileContents = await realFs.promises.readFile(filePath, 'utf8')
212
- // const realFileContents = fileContents.replace(/\r/g, '')
213
- // expect(realFileContents).to.equal(expected)
214
- // })
208
+ it ( 'should change the contents of a file' , async ( ) => {
209
+ const expected = 'somefilecontents\nmorecontents\n'
210
+ await fs . setFileContents ( 'text_file_for_test.txt' , expected )
211
+ const fileContents = await realFs . promises . readFile ( filePath , 'utf8' )
212
+ const realFileContents = fileContents . replace ( / \r / g, '' )
213
+ expect ( realFileContents ) . to . equal ( expected )
214
+ } )
215
215
216
216
after ( async ( ) => {
217
217
// reset the file contents
0 commit comments