11cb0ef41Sopenharmony_ci'use strict'; 21cb0ef41Sopenharmony_ci 31cb0ef41Sopenharmony_ciconst { spawnPromisified } = require('../common'); 41cb0ef41Sopenharmony_ciconst fixtures = require('../common/fixtures.js'); 51cb0ef41Sopenharmony_ciconst assert = require('node:assert'); 61cb0ef41Sopenharmony_ciconst { execPath } = require('node:process'); 71cb0ef41Sopenharmony_ciconst { describe, it } = require('node:test'); 81cb0ef41Sopenharmony_ci 91cb0ef41Sopenharmony_ci 101cb0ef41Sopenharmony_cidescribe('ESM: importing an encoded path', () => { 111cb0ef41Sopenharmony_ci it('should throw', async () => { 121cb0ef41Sopenharmony_ci const { code } = await spawnPromisified(execPath, [ 131cb0ef41Sopenharmony_ci fixtures.path('es-module-url/native.mjs'), 141cb0ef41Sopenharmony_ci ]); 151cb0ef41Sopenharmony_ci 161cb0ef41Sopenharmony_ci assert.strictEqual(code, 1); 171cb0ef41Sopenharmony_ci }); 181cb0ef41Sopenharmony_ci}); 19