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 <legendecas@gmail.com>
Reviewed-By: Matteo Collina <matteo.collina@gmail.com>
  • Loading branch information
joyeecheung authored and Fyko committed Sep 15, 2022
1 parent aa44fe5 commit 997aa38
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 997aa38

Please sign in to comment.