Skip to content

Commit

Permalink
Use readFile promise
Browse files Browse the repository at this point in the history
  • Loading branch information
fb55 committed Mar 17, 2022
1 parent 459094c commit b236db5
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion packages/parse5-sax-parser/test/sax-parser.test.ts
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
import * as assert from 'node:assert';
import * as fs from 'node:fs';
import { readFile } from 'node:fs/promises';
import { finished } from 'parse5-test-utils/utils/common.js';
import { SAXParser, SAXParserOptions } from '../lib/index.js';
import { loadSAXParserTestData } from 'parse5-test-utils/utils/load-sax-parser-test-data.js';
Expand Down Expand Up @@ -98,7 +99,7 @@ describe('SAX parser', () => {

await finished(writable);

const expected = fs.readFileSync(hugePage).toString();
const expected = await readFile(hugePage, 'utf8');

assert.strictEqual(handlerCallCount, 10);
assert.strictEqual(writable.writtenData, expected);
Expand Down

0 comments on commit b236db5

Please sign in to comment.