/
githubmirror
/
node
Обзор
Документация
Войти
/
githubmirror
/
node
Код
Запросы
0
Пакеты
0
Релизы
0
Аналитика
Безопасность
v25.9.0
test/module-hooks/test-module-hooks-preload.js
47 строк
2 KB
Marco Ippolito
module: unflag --experimental-strip-types
26 дек 2024, 21:46
Не верифицирован
26 дек 2024, 21:46
ba59928
Код
Авторство
О чём код?
'use strict'; require('../common'); const fixtures = require('../common/fixtures.js'); const { spawnSyncAndAssert } = require('../common/child_process.js'); spawnSyncAndAssert(process.execPath, [ '--require', fixtures.path('module-hooks', 'register-typescript-hooks.js'), fixtures.path('module-hooks', 'log-user.cts'), ], { trim: true, stdout: 'UserAccount { name: \'john\', id: 100, type: 1 }', }); spawnSyncAndAssert(process.execPath, [ '--no-experimental-transform-types', '--require', fixtures.path('module-hooks', 'register-typescript-hooks.js'), fixtures.path('module-hooks', 'log-user.cts'), ], { trim: true, stdout: 'UserAccount { name: \'john\', id: 100, type: 1 }', }); spawnSyncAndAssert(process.execPath, [ '--import', fixtures.fileURL('module-hooks', 'register-typescript-hooks.js'), fixtures.path('module-hooks', 'log-user.mts'), ], { trim: true, stdout: 'UserAccount { name: \'john\', id: 100, type: 1 }', }); spawnSyncAndAssert(process.execPath, [ '--no-experimental-transform-types', '--import', fixtures.fileURL('module-hooks', 'register-typescript-hooks.js'), fixtures.path('module-hooks', 'log-user.mts'), ], { trim: true, stdout: 'UserAccount { name: \'john\', id: 100, type: 1 }', });