Skip to content

Commit

Permalink
fix: adjust tests
Browse files Browse the repository at this point in the history
  • Loading branch information
mshima authored Dec 12, 2024
1 parent 297b396 commit 6cfa396
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions test/base.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -897,7 +897,7 @@ describe('Base', () => {
assert.equal(spy.firstCall.thisValue.options.namespace, 'mocha');
assert.equal(
spy.firstCall.thisValue.options.resolved,
pathToFileURL(createRequire(import.meta.url).resolve(stubPath)).href,
createRequire(import.meta.url).resolve(stubPath),
);
});

Expand Down Expand Up @@ -950,7 +950,7 @@ describe('Base', () => {
spy = sinonSpy();
dummy.resolved = _filename;
stubPath = './fixtures/generator-mocha';
resolvedStub = pathToFileURL(require.resolve(stubPath)).href;
resolvedStub = require.resolve(stubPath);
const module = await import(resolvedStub);
LocalDummy = module.default;
LocalDummy.prototype.exec = spy;
Expand Down

0 comments on commit 6cfa396

Please sign in to comment.