node/test/fixtures/pkgexports.mjs

13 lines
317 B
JavaScript
Raw Normal View History

import { fileURLToPath } from 'url';
import { createRequire } from 'module';
const rawRequire = createRequire(fileURLToPath(import.meta.url));
export async function requireFixture(specifier) {
return { default: rawRequire(specifier ) };
}
export function importFixture(specifier) {
return import(specifier);
}