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 ddff644

Browse filesBrowse files
BridgeARBethGriggs
authored andcommitted
test: run eslint on test file and fix errors
This removes two entries from the eslint ignore file. One file does not exist anymore and the other one could easily be fixed. PR-URL: #25009 Reviewed-By: Sakthipriyan Vairamani <thechargingvolcano@gmail.com> Reviewed-By: Rich Trott <rtrott@gmail.com>
1 parent 110fd39 commit ddff644
Copy full SHA for ddff644

File tree

Expand file treeCollapse file tree

2 files changed

+10
-11
lines changed
Open diff view settings
Filter options
Expand file treeCollapse file tree

2 files changed

+10
-11
lines changed
Open diff view settings
Collapse file

‎.eslintignore‎

Copy file name to clipboardExpand all lines: .eslintignore
-2Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,7 @@
11
node_modules
2-
lib/internal/v8.js
32
lib/internal/v8_prof_polyfill.js
43
lib/punycode.js
54
test/addons/??_*
6-
test/es-module/test-esm-dynamic-import.js
75
test/fixtures
86
test/message/esm_display_syntax_error.mjs
97
tools/icu
Collapse file

‎test/es-module/test-esm-dynamic-import.js‎

Copy file name to clipboardExpand all lines: test/es-module/test-esm-dynamic-import.js
+10-9Lines changed: 10 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@ targetURL.pathname = absolutePath;
1111

1212
function expectErrorProperty(result, propertyKey, value) {
1313
Promise.resolve(result)
14-
.catch(common.mustCall(error => {
14+
.catch(common.mustCall((error) => {
1515
assert.strictEqual(error[propertyKey], value);
1616
}));
1717
}
@@ -22,15 +22,16 @@ function expectMissingModuleError(result) {
2222

2323
function expectOkNamespace(result) {
2424
Promise.resolve(result)
25-
.then(common.mustCall(ns => {
25+
.then(common.mustCall((ns) => {
2626
// Can't deepStrictEqual because ns isn't a normal object
27+
// eslint-disable-next-line no-restricted-properties
2728
assert.deepEqual(ns, { default: true });
2829
}));
2930
}
3031

3132
function expectFsNamespace(result) {
3233
Promise.resolve(result)
33-
.then(common.mustCall(ns => {
34+
.then(common.mustCall((ns) => {
3435
assert.strictEqual(typeof ns.default.writeFile, 'function');
3536
assert.strictEqual(typeof ns.writeFile, 'function');
3637
}));
@@ -41,19 +42,19 @@ function expectFsNamespace(result) {
4142
(function testScriptOrModuleImport() {
4243
// Importing another file, both direct & via eval
4344
// expectOkNamespace(import(relativePath));
44-
expectOkNamespace(eval.call(null, `import("${relativePath}")`));
4545
expectOkNamespace(eval(`import("${relativePath}")`));
46-
expectOkNamespace(eval.call(null, `import("${targetURL}")`));
46+
expectOkNamespace(eval(`import("${relativePath}")`));
47+
expectOkNamespace(eval(`import("${targetURL}")`));
4748

4849
// Importing a built-in, both direct & via eval
49-
expectFsNamespace(import("fs"));
50+
expectFsNamespace(import('fs'));
51+
expectFsNamespace(eval('import("fs")'));
5052
expectFsNamespace(eval('import("fs")'));
51-
expectFsNamespace(eval.call(null, 'import("fs")'));
5253

53-
expectMissingModuleError(import("./not-an-existing-module.mjs"));
54+
expectMissingModuleError(import('./not-an-existing-module.mjs'));
5455
// TODO(jkrems): Right now this doesn't hit a protocol error because the
5556
// module resolution step already rejects it. These arguably should be
5657
// protocol errors.
57-
expectMissingModuleError(import("node:fs"));
58+
expectMissingModuleError(import('node:fs'));
5859
expectMissingModuleError(import('http://example.com/foo.js'));
5960
})();

0 commit comments

Comments
0 (0)
Morty Proxy This is a proxified and sanitized view of the page, visit original site.