Skip to content

Commit c5e04c5

Browse 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

File tree

3 files changed

+3068
-0
lines changed

3 files changed

+3068
-0
lines changed
Lines 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)
pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy