@@ -11,7 +11,7 @@ targetURL.pathname = absolutePath;
1111
1212function 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
2323function 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
3132function 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