Skip to content

Commit

Permalink
update testutils
Browse files Browse the repository at this point in the history
  • Loading branch information
UziTech committed Oct 10, 2023
1 parent 9f7bceb commit c514b1c
Show file tree
Hide file tree
Showing 3 changed files with 32 additions and 31 deletions.
24 changes: 12 additions & 12 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,7 @@
"html"
],
"devDependencies": {
"@markedjs/testutils": "^9.0.3",
"@markedjs/testutils": "9.1.0-2",
"@rollup/plugin-terser": "^0.4.4",
"@rollup/plugin-typescript": "^11.1.3",
"@semantic-release/commit-analyzer": "^11.0.0",
Expand Down
37 changes: 19 additions & 18 deletions test/run-spec-tests.js
Original file line number Diff line number Diff line change
Expand Up @@ -10,40 +10,41 @@ function parse(markdown, options) {

const __dirname = dirname(fileURLToPath(import.meta.url));

const tests = await getTests({
CommonMark: resolve(__dirname, './specs/commonmark'),
GFM: resolve(__dirname, './specs/gfm'),
New: resolve(__dirname, './specs/new'),
Original: resolve(__dirname, './specs/original'),
ReDOS: resolve(__dirname, './specs/redos')
});

outputCompletionTable('CommonMark', tests.CommonMark);
const [commonMarkTests, gfmTests, newTests, originalTests, redosTests] =
await getTests([
resolve(__dirname, './specs/commonmark'),
resolve(__dirname, './specs/gfm'),
resolve(__dirname, './specs/new'),
resolve(__dirname, './specs/original'),
resolve(__dirname, './specs/redos')
]);

outputCompletionTable('CommonMark', commonMarkTests);
runTests({
tests: tests.CommonMark,
tests: commonMarkTests,
parse,
defaultMarkedOptions: { gfm: false, pedantic: false }
});

outputCompletionTable('GFM', tests.GFM);
outputCompletionTable('GFM', gfmTests);
runTests({
tests: tests.GFM,
tests: gfmTests,
parse,
defaultMarkedOptions: { gfm: true, pedantic: false }
});

runTests({
tests: tests.Original,
parse,
defaultMarkedOptions: { gfm: false, pedantic: true }
tests: newTests,
parse
});

runTests({
tests: tests.New,
parse
tests: originalTests,
parse,
defaultMarkedOptions: { gfm: false, pedantic: true }
});

runTests({
tests: tests.RedDOS,
tests: redosTests,
parse
});

0 comments on commit c514b1c

Please sign in to comment.