Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Appearance settings

Commit d4189ab

Browse filesBrowse files
joyeecheungruyadorno
authored andcommitted
test: add UMD module test with marked
PR-URL: #38905 Refs: #35711 Reviewed-By: Chengzhong Wu <legendecas@gmail.com> Reviewed-By: Matteo Collina <matteo.collina@gmail.com>
1 parent 597a517 commit d4189ab
Copy full SHA for d4189ab

File tree

Expand file treeCollapse file tree

3 files changed

+3068
-0
lines changed
Open diff view settings
Filter options
Expand file treeCollapse file tree

3 files changed

+3068
-0
lines changed
Open diff view settings
Collapse file
+21Lines changed: 21 additions & 0 deletions
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 (0)
Morty Proxy This is a proxified and sanitized view of the page, visit original site.