mirror of
https://github.com/nodejs/node.git
synced 2024-11-30 15:30:56 +01:00
2551a21553
PR-URL: https://github.com/nodejs/node/pull/30986 Reviewed-By: Guy Bedford <guybedford@gmail.com> Reviewed-By: Bradley Farias <bradley.meck@gmail.com>
14 lines
557 B
JavaScript
14 lines
557 B
JavaScript
'use strict';
|
|
require('../common');
|
|
const fixtures = require('../common/fixtures');
|
|
const assert = require('assert');
|
|
const { spawnSync } = require('child_process');
|
|
const fixture = fixtures.path('/es-modules/import-invalid-ext.mjs');
|
|
const child = spawnSync(process.execPath, [fixture]);
|
|
const errMsg = 'TypeError [ERR_UNKNOWN_FILE_EXTENSION]: Unknown file extension';
|
|
|
|
assert.strictEqual(child.status, 1);
|
|
assert.strictEqual(child.signal, null);
|
|
assert.strictEqual(child.stdout.toString().trim(), '');
|
|
assert.ok(child.stderr.toString().includes(errMsg));
|