node/test/es-module/test-esm-encoded-path-native.js
Jacob Smith 447635b440
test: refactor ESM tests to improve performance
PR-URL: https://github.com/nodejs/node/pull/43784
Reviewed-By: Geoffrey Booth <webadmin@geoffreybooth.com>
Reviewed-By: Antoine du Hamel <duhamelantoine1995@gmail.com>
2022-07-29 10:42:55 +02:00

19 lines
494 B
JavaScript

'use strict';
const { spawnPromisified } = require('../common');
const fixtures = require('../common/fixtures.js');
const assert = require('node:assert');
const { execPath } = require('node:process');
const { describe, it } = require('node:test');
describe('ESM: importing an encoded path', () => {
it('should throw', async () => {
const { code } = await spawnPromisified(execPath, [
fixtures.path('es-module-url/native.mjs'),
]);
assert.strictEqual(code, 1);
});
});