-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
fix: stripComments bug that caused infinite loop
- Loading branch information
1 parent
8f128d9
commit dbd9819
Showing
3 changed files
with
217 additions
and
1 deletion.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Large diffs are not rendered by default.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,15 @@ | ||
const {readFileSync} = require('node:fs') | ||
const {resolve} = require('node:path') | ||
const test = require('ava') | ||
const parse = require('../hypertag.js') | ||
const {stripComments} = require('../hypertag.js') | ||
|
||
const html = readFileSync(resolve(__dirname, './fixture-qualcomm.html'), 'utf-8') | ||
|
||
test('it can strip comments from developer.qualcomm.com', t => { | ||
t.notThrows(() => stripComments(html)) | ||
}) | ||
|
||
test('it can parse developer.qualcomm.com', t => { | ||
t.notThrows(() => parse(html)) | ||
}) |