Skip to content

Commit d4189ab

Browse files
joyeecheungruyadorno
authored andcommitted
test: add UMD module test with marked
PR-URL: #38905 Refs: #35711 Reviewed-By: Chengzhong Wu <[email protected]> Reviewed-By: Matteo Collina <[email protected]>
1 parent 597a517 commit d4189ab

File tree

3 files changed

+3068
-0
lines changed

3 files changed

+3068
-0
lines changed
+21
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,21 @@
1+
'use strict';
2+
3+
let marked;
4+
if (process.env.NODE_TEST_USE_SNAPSHOT === 'true') {
5+
console.error('NODE_TEST_USE_SNAPSHOT true');
6+
marked = globalThis.marked;
7+
} else {
8+
console.error('NODE_TEST_USE_SNAPSHOT false');
9+
marked = require('./marked');
10+
}
11+
12+
const md = `
13+
# heading
14+
15+
[link][1]
16+
17+
[1]: #heading "heading"
18+
`;
19+
20+
const html = marked(md)
21+
console.log(html);

0 commit comments

Comments
 (0)