2022-07-29 08:42:55 +00:00
|
|
|
import { spawnPromisified } from '../common/index.mjs';
|
2020-02-18 10:43:10 +00:00
|
|
|
import { path } from '../common/fixtures.mjs';
|
2022-07-29 08:42:55 +00:00
|
|
|
import { strictEqual } from 'node:assert';
|
|
|
|
import { execPath } from 'node:process';
|
|
|
|
import { describe, it } from 'node:test';
|
2020-02-18 10:43:10 +00:00
|
|
|
|
|
|
|
|
2024-03-23 21:11:28 +00:00
|
|
|
describe('ESM: experiemental warning for import.meta.resolve', { concurrency: !process.env.TEST_PARALLEL }, () => {
|
2022-07-29 08:42:55 +00:00
|
|
|
it('should not warn when caught', async () => {
|
|
|
|
const { code, signal, stderr } = await spawnPromisified(execPath, [
|
|
|
|
'--experimental-import-meta-resolve',
|
|
|
|
path('es-modules/import-resolve-exports.mjs'),
|
|
|
|
]);
|
|
|
|
|
|
|
|
strictEqual(stderr, '');
|
|
|
|
strictEqual(code, 0);
|
|
|
|
strictEqual(signal, null);
|
|
|
|
});
|
2020-02-18 10:43:10 +00:00
|
|
|
});
|