Skip to content

Commit

Permalink
lint fixes
Browse files Browse the repository at this point in the history
  • Loading branch information
awto committed Jan 16, 2025
1 parent 09003dd commit cd26b45
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 12 deletions.
Original file line number Diff line number Diff line change
@@ -1,11 +1,7 @@
'use strict';

import { mustCall } from '../common/index.mjs';
import assert from 'node:assert';
import { registerHooks } from 'node:module';
import { fileURL } from '../common/fixtures.mjs';
import { pathToFileURL } from "node:url";
import { sep as pathSep } from "node:path";

// This tests shows the url parameter in `load` can be changed in the `nextLoad` call
// It changes `foo` package name into `redirected-fs` and then loads `redirected-fs`
Expand All @@ -20,10 +16,7 @@ const hook = registerHooks({
},
load: mustCall(function load(url, context, nextLoad) {
assert.strictEqual(url, 'foo://bar');
return nextLoad(
fileURL('module-hooks', `redirected-fs.js`).href,
context
);
return nextLoad(fileURL('module-hooks', 'redirected-fs.js').href, context);
}),
});

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -12,15 +12,15 @@ const hook = registerHooks({
resolve(specifier, context, nextResolve) {
assert.strictEqual(specifier, 'foo');
return {
url: "foo://bar",
url: 'foo://bar',
shortCircuit: true,
};
},
load: common.mustCall(function load(url, context, nextLoad) {
assert.strictEqual(url, "foo://bar",);
assert.strictEqual(url, 'foo://bar');
return nextLoad(
fixtures.fileURL('module-hooks', `redirected-fs.js`).href,
context,
fixtures.fileURL('module-hooks', 'redirected-fs.js').href,
context
);
}),
});
Expand Down

0 comments on commit cd26b45

Please sign in to comment.