1'use strict'; 2 3const { spawnPromisified } = require('../common'); 4const fixtures = require('../common/fixtures.js'); 5const assert = require('node:assert'); 6const { execPath } = require('node:process'); 7const { describe, it } = require('node:test'); 8 9 10describe('ESM: importing an encoded path', () => { 11 it('should throw', async () => { 12 const { code } = await spawnPromisified(execPath, [ 13 fixtures.path('es-module-url/native.mjs'), 14 ]); 15 16 assert.strictEqual(code, 1); 17 }); 18}); 19