Skip to content

Commit

Permalink
test: add UMD module test with marked
Browse files Browse the repository at this point in the history
PR-URL: nodejs#38905
Refs: nodejs#35711
Reviewed-By: Chengzhong Wu <[email protected]>
Reviewed-By: Matteo Collina <[email protected]>
  • Loading branch information
joyeecheung committed Aug 2, 2022
1 parent 2ab92c7 commit a783fdc
Show file tree
Hide file tree
Showing 3 changed files with 3,068 additions and 0 deletions.
21 changes: 21 additions & 0 deletions test/fixtures/snapshot/check-marked.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
'use strict';

let marked;
if (process.env.NODE_TEST_USE_SNAPSHOT === 'true') {
console.error('NODE_TEST_USE_SNAPSHOT true');
marked = globalThis.marked;
} else {
console.error('NODE_TEST_USE_SNAPSHOT false');
marked = require('./marked');
}

const md = `
# heading
[link][1]
[1]: #heading "heading"
`;

const html = marked(md)
console.log(html);
Loading

0 comments on commit a783fdc

Please sign in to comment.