Skip to content

Commit a36b406

Browse files
committed
fix: add node check for emoji test | fixed escaping of backslash
1 parent c4fdda3 commit a36b406

File tree

1 file changed

+10
-1
lines changed

1 file changed

+10
-1
lines changed

tests/rules/no-missing-link-fragments.test.js

Lines changed: 10 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -159,7 +159,13 @@ ruleTester.run("no-missing-link-fragments", rule, {
159159
`,
160160

161161
// Headings with emojis and accented characters
162-
dedent`
162+
// This test case is skipped for non-Node environments like Bun
163+
...(typeof process !== "undefined" &&
164+
process.release &&
165+
process.release.name === "node" &&
166+
(!process.versions || !process.versions.bun)
167+
? [
168+
dedent`
163169
# Heading with 🚀 emoji
164170
[Link](#heading-with--emoji)
165171
@@ -169,11 +175,14 @@ ruleTester.run("no-missing-link-fragments", rule, {
169175
# Mix: _Héading_ with 🚀 & \`code\`
170176
[Link](#mix-héading-with---code)
171177
`,
178+
]
179+
: []),
172180

173181
{
174182
code: '<div id="HtmlCaseCheck"></div>\n[Link](#htmlcasecheck)',
175183
options: [{ ignoreCase: true }],
176184
},
185+
177186
// Valid: HTML ID inside comment is ignored, link to valid ID still works
178187
dedent`
179188
<!-- <div id="commented-out"></div> -->

0 commit comments

Comments
 (0)