|
2 | 2 | import fs, { mkdirSync, rmSync } from 'node:fs';
|
3 | 3 | import os from 'node:os';
|
4 | 4 | import path, { dirname } from 'node:path';
|
5 |
| -import { fileURLToPath, pathToFileURL } from 'node:url'; |
| 5 | +import { fileURLToPath } from 'node:url'; |
6 | 6 | import { createRequire } from 'node:module';
|
7 | 7 | import process from 'node:process';
|
8 | 8 | import { Buffer } from 'node:buffer';
|
@@ -897,7 +897,7 @@ describe('Base', () => {
|
897 | 897 | assert.equal(spy.firstCall.thisValue.options.namespace, 'mocha');
|
898 | 898 | assert.equal(
|
899 | 899 | spy.firstCall.thisValue.options.resolved,
|
900 |
| - pathToFileURL(createRequire(import.meta.url).resolve(stubPath)).href, |
| 900 | + createRequire(import.meta.url).resolve(stubPath), |
901 | 901 | );
|
902 | 902 | });
|
903 | 903 |
|
@@ -950,7 +950,7 @@ describe('Base', () => {
|
950 | 950 | spy = sinonSpy();
|
951 | 951 | dummy.resolved = _filename;
|
952 | 952 | stubPath = './fixtures/generator-mocha';
|
953 |
| - resolvedStub = pathToFileURL(require.resolve(stubPath)).href; |
| 953 | + resolvedStub = require.resolve(stubPath); |
954 | 954 | const module = await import(resolvedStub);
|
955 | 955 | LocalDummy = module.default;
|
956 | 956 | LocalDummy.prototype.exec = spy;
|
|
0 commit comments