Skip to content

Commit

Permalink
Infrastructure: Fix report.js unsupported buffer (#2151)
Browse files Browse the repository at this point in the history
Update test/util/report.js to fix an issue discovered in #959. Buffers being passed to `htmlparser2.parseDocument` is unsupported.
  • Loading branch information
howard-e authored Nov 22, 2021
1 parent 764a6b5 commit 8aee856
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions test/util/report.js
Original file line number Diff line number Diff line change
Expand Up @@ -108,8 +108,8 @@ const processDocumentationInExampleFiles = function (
exampleCoverage
) {
for (let exampleFile of exampleFiles) {
var data = fs.readFileSync(exampleFile);
const dom = htmlparser2.parseDOM(data);
var data = fs.readFileSync(exampleFile, 'utf-8');
const dom = htmlparser2.parseDocument(data);
const $ = cheerio.load(dom);

let dataTestIds = new Set();
Expand Down

0 comments on commit 8aee856

Please sign in to comment.