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 c5e04c5

Browse filesBrowse files
joyeecheungdanielleadams
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 54c8339 commit c5e04c5
Copy full SHA for c5e04c5

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.