/
githubmirror
/
babel
Обзор
Документация
Войти
/
githubmirror
/
babel
Код
Запросы
0
Пакеты
0
Релизы
0
Аналитика
Безопасность
main
packages/babel-plugin-transform-runtime/test/regression.js
16 строк
499 B
Huáng Jùnliàng
Enforce node protocol import (#17207)
31 мар 2025, 17:49
Не верифицирован
31 мар 2025, 17:49
317e332
Код
Авторство
О чём код?
import { createRequire } from "node:module"; const require = createRequire(import.meta.url); it("module.exports.default is correctly updated", () => { // eslint-disable-next-line import/extensions const typeofHelper = require("@babel/runtime/helpers/typeof"); expect(typeof typeofHelper).toBe("function"); expect(typeof typeofHelper.default).toBe("function"); typeofHelper(); expect(typeof typeofHelper).toBe("function"); expect(typeof typeofHelper.default).toBe("function"); });