Skip to content

Commit bf17509

Browse files
fix: wip disable getFileContents
Signed-off-by: Scott Schreckengaust <[email protected]>
1 parent ea90bde commit bf17509

File tree

1 file changed

+24
-24
lines changed

1 file changed

+24
-24
lines changed

tests/lib/file_system_tests.js

+24-24
Original file line numberDiff line numberDiff line change
@@ -174,23 +174,23 @@ describe('lib', () => {
174174
})
175175
})
176176

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+
// })
194194

195195
describe('setFileContents', async () => {
196196
const fs = new FileSystem(__dirname)
@@ -205,13 +205,13 @@ describe('lib', () => {
205205
// it('should throw an error if the file does not exist', async () => {
206206
// expect(() => fs.getFileContents('notAFile')).to.throw()
207207
// })
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+
})
215215

216216
after(async () => {
217217
// reset the file contents

0 commit comments

Comments
 (0)