Skip to content

Commit 14d15a7

Browse files
committed
fix one test and add comments
1 parent bfaa190 commit 14d15a7

File tree

1 file changed

+5
-1
lines changed

1 file changed

+5
-1
lines changed

tests/src/rules/no-unused-modules.js

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1304,6 +1304,7 @@ describe('support ES2022 Arbitrary module namespace identifier names', () => {
13041304
});
13051305

13061306
describe('parser ignores prefixes like BOM and hashbang', () => {
1307+
// bom, hashbang
13071308
ruleTester.run('no-unused-modules', rule, {
13081309
valid: [
13091310
test({
@@ -1313,12 +1314,13 @@ describe('parser ignores prefixes like BOM and hashbang', () => {
13131314
}),
13141315
test({
13151316
options: unusedExportsOptions,
1316-
code: `\uFEFFimport {foo} from './prefix-child.js';\n`,
1317+
code: `\uFEFF#!/usr/bin/env node\nimport {foo} from './prefix-child.js';\n`,
13171318
filename: testFilePath('./no-unused-modules/prefix-parent-bom.js'),
13181319
}),
13191320
],
13201321
invalid: [],
13211322
});
1323+
// no bom, hashbang
13221324
ruleTester.run('no-unused-modules', rule, {
13231325
valid: [
13241326
test({
@@ -1334,6 +1336,7 @@ describe('parser ignores prefixes like BOM and hashbang', () => {
13341336
],
13351337
invalid: [],
13361338
});
1339+
// bom, no hashbang
13371340
ruleTester.run('no-unused-modules', rule, {
13381341
valid: [
13391342
test({
@@ -1349,6 +1352,7 @@ describe('parser ignores prefixes like BOM and hashbang', () => {
13491352
],
13501353
invalid: [],
13511354
});
1355+
// no bom, no hashbang
13521356
ruleTester.run('no-unused-modules', rule, {
13531357
valid: [
13541358
test({

0 commit comments

Comments
 (0)