Skip to content

Commit 6044eed

Browse files
fix: wip still node22 issues
Signed-off-by: Scott Schreckengaust <[email protected]>
1 parent 419b994 commit 6044eed

File tree

1 file changed

+19
-19
lines changed

1 file changed

+19
-19
lines changed

tests/lib/file_system_tests.js

+19-19
Original file line numberDiff line numberDiff line change
@@ -190,29 +190,29 @@ describe('lib', () => {
190190
'The contents of this file\nwill be monitored for quality assurance purposes\n'
191191
)
192192
})
193+
})
193194

194-
describe('setFileContents', async () => {
195-
const fs = new FileSystem(__dirname)
196-
const filePath = path.resolve(__dirname, 'text_file_for_test.txt')
197-
const contents = await realFs.promises.readFile(filePath)
195+
describe('setFileContents', async () => {
196+
const fs = new FileSystem(__dirname)
197+
const filePath = path.resolve(__dirname, 'text_file_for_test.txt')
198+
const contents = await realFs.promises.readFile(filePath)
198199

199-
it('should return undefined if the file does not exist', async () => {
200-
const actual = await fs.getFileContents('notAFile')
201-
expect(actual).to.equal(undefined)
202-
})
200+
it('should return undefined if the file does not exist', async () => {
201+
const actual = await fs.getFileContents('notAFile')
202+
expect(actual).to.equal(undefined)
203+
})
203204

204-
it('should change the contents of a file', async () => {
205-
const expected = 'somefilecontents\nmorecontents\n'
206-
await fs.setFileContents('text_file_for_test.txt', expected)
207-
const fileContents = await realFs.promises.readFile(filePath, 'utf8')
208-
const realFileContents = fileContents.replace(/\r/g, '')
209-
expect(realFileContents).to.equal(expected)
210-
})
205+
it('should change the contents of a file', async () => {
206+
const expected = 'somefilecontents\nmorecontents\n'
207+
await fs.setFileContents('text_file_for_test.txt', expected)
208+
const fileContents = await realFs.promises.readFile(filePath, 'utf8')
209+
const realFileContents = fileContents.replace(/\r/g, '')
210+
expect(realFileContents).to.equal(expected)
211+
})
211212

212-
after(async () => {
213-
// reset the file contents
214-
await realFs.promises.writeFile(filePath, contents)
215-
})
213+
after(async () => {
214+
// reset the file contents
215+
await realFs.promises.writeFile(filePath, contents)
216216
})
217217
})
218218

0 commit comments

Comments
 (0)