Skip to content

Commit cd26b45

Browse files
committed
lint fixes
1 parent 09003dd commit cd26b45

File tree

2 files changed

+5
-12
lines changed

2 files changed

+5
-12
lines changed

test/module-hooks/test-module-hooks-load-url-change-import.mjs

Lines changed: 1 addition & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,7 @@
1-
'use strict';
2-
31
import { mustCall } from '../common/index.mjs';
42
import assert from 'node:assert';
53
import { registerHooks } from 'node:module';
64
import { fileURL } from '../common/fixtures.mjs';
7-
import { pathToFileURL } from "node:url";
8-
import { sep as pathSep } from "node:path";
95

106
// This tests shows the url parameter in `load` can be changed in the `nextLoad` call
117
// It changes `foo` package name into `redirected-fs` and then loads `redirected-fs`
@@ -20,10 +16,7 @@ const hook = registerHooks({
2016
},
2117
load: mustCall(function load(url, context, nextLoad) {
2218
assert.strictEqual(url, 'foo://bar');
23-
return nextLoad(
24-
fileURL('module-hooks', `redirected-fs.js`).href,
25-
context
26-
);
19+
return nextLoad(fileURL('module-hooks', 'redirected-fs.js').href, context);
2720
}),
2821
});
2922

test/module-hooks/test-module-hooks-load-url-change-require.js

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -12,15 +12,15 @@ const hook = registerHooks({
1212
resolve(specifier, context, nextResolve) {
1313
assert.strictEqual(specifier, 'foo');
1414
return {
15-
url: "foo://bar",
15+
url: 'foo://bar',
1616
shortCircuit: true,
1717
};
1818
},
1919
load: common.mustCall(function load(url, context, nextLoad) {
20-
assert.strictEqual(url, "foo://bar",);
20+
assert.strictEqual(url, 'foo://bar');
2121
return nextLoad(
22-
fixtures.fileURL('module-hooks', `redirected-fs.js`).href,
23-
context,
22+
fixtures.fileURL('module-hooks', 'redirected-fs.js').href,
23+
context
2424
);
2525
}),
2626
});

0 commit comments

Comments
 (0)