xref: /third_party/node/test/es-module/test-esm-require-cache.mjs (revision 1cb0ef41)
  • Home
  • History
  • Annotate Annotate
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
  • only in /third_party/node/test/es-module/
11cb0ef41Sopenharmony_ciimport { createRequire } from '../common/index.mjs';
21cb0ef41Sopenharmony_ciimport assert from 'assert';
31cb0ef41Sopenharmony_ci//
41cb0ef41Sopenharmony_ciconst require = createRequire(import.meta.url);
51cb0ef41Sopenharmony_ci
61cb0ef41Sopenharmony_cirequire('../fixtures/es-module-require-cache/preload.js');
71cb0ef41Sopenharmony_cirequire('../fixtures/es-module-require-cache/counter.js');
81cb0ef41Sopenharmony_ci
91cb0ef41Sopenharmony_ciassert.strictEqual(global.counter, 1);
101cb0ef41Sopenharmony_cidelete global.counter;
11

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