Skip to content

Commit 970c7e7

Browse files
committed
test: remove deprecated globalPreload tests
The globalPreload warning is no longer emitted, so the related test is removed.
1 parent 2fd5890 commit 970c7e7

File tree

1 file changed

+0
-24
lines changed

1 file changed

+0
-24
lines changed

test/es-module/test-esm-loader-hooks.mjs

Lines changed: 0 additions & 24 deletions
Original file line numberDiff line numberDiff line change
@@ -446,30 +446,6 @@ describe('Loader hooks', { concurrency: !process.env.TEST_PARALLEL }, () => {
446446
});
447447
});
448448

449-
describe('globalPreload', () => {
450-
it('should emit warning', async () => {
451-
const { stderr } = await spawnPromisified(execPath, [
452-
'--experimental-loader',
453-
'data:text/javascript,export function globalPreload(){}',
454-
'--experimental-loader',
455-
'data:text/javascript,export function globalPreload(){return""}',
456-
fixtures.path('empty.js'),
457-
]);
458-
459-
assert.strictEqual(stderr.match(/`globalPreload` has been removed; use `initialize` instead/g).length, 1);
460-
});
461-
462-
it('should not emit warning when initialize is supplied', async () => {
463-
const { stderr } = await spawnPromisified(execPath, [
464-
'--experimental-loader',
465-
'data:text/javascript,export function globalPreload(){}export function initialize(){}',
466-
fixtures.path('empty.js'),
467-
]);
468-
469-
assert.doesNotMatch(stderr, /`globalPreload` has been removed; use `initialize` instead/);
470-
});
471-
});
472-
473449
it('should be fine to call `process.removeAllListeners("beforeExit")` from the main thread', async () => {
474450
const { code, signal, stdout, stderr } = await spawnPromisified(execPath, [
475451
'--no-warnings',

0 commit comments

Comments
 (0)