xref: /third_party/node/test/fixtures/es-module-loaders/builtin-named-exports.mjs
  • Home
  • History
  • Annotate Annotate
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
  • only in /third_party/node/test/fixtures/es-module-loaders/
11cb0ef41Sopenharmony_ciimport * as fixtures from '../../common/fixtures.mjs';
21cb0ef41Sopenharmony_ciimport { createRequire, register } from 'node:module';
31cb0ef41Sopenharmony_ci
41cb0ef41Sopenharmony_ciconst require = createRequire(import.meta.url);
51cb0ef41Sopenharmony_ci
61cb0ef41Sopenharmony_ciconst GET_BUILTIN = `$__get_builtin_hole_${Date.now()}`;
71cb0ef41Sopenharmony_ciObject.defineProperty(globalThis, GET_BUILTIN, {
81cb0ef41Sopenharmony_ci  value: builtinName => require(builtinName),
91cb0ef41Sopenharmony_ci  enumerable: false,
101cb0ef41Sopenharmony_ci  configurable: false,
111cb0ef41Sopenharmony_ci});
121cb0ef41Sopenharmony_ci
131cb0ef41Sopenharmony_ciregister(fixtures.fileURL('es-module-loaders/builtin-named-exports-loader.mjs'), {
141cb0ef41Sopenharmony_ci  data: {
151cb0ef41Sopenharmony_ci    GET_BUILTIN,
161cb0ef41Sopenharmony_ci  },
171cb0ef41Sopenharmony_ci});
18

Indexes created Thu Nov 07 10:32:03 CST 2024