Skip to content

test(node): Add utility to test esm & cjs instrumentation #16159

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 15 commits into from
Apr 30, 2025
Prev Previous commit
Next Next commit
always create files even if cjs is skipped
  • Loading branch information
mydea committed Apr 30, 2025
commit 117553911307cc380ee7b7d211fa3b7c43b3d33c
6 changes: 2 additions & 4 deletions dev-packages/node-integration-tests/utils/runner.ts
Original file line number Diff line number Diff line change
Expand Up @@ -191,10 +191,8 @@ export function createEsmAndCjsTests(
const cjsInstrumentPath = join(cwd, `tmp_${instrumentPath.replace('.mjs', '.cjs')}`);

// For the CJS runner, we create some temporary files...
if (!options?.failsOnCjs) {
convertEsmFileToCjs(mjsScenarioPath, cjsScenarioPath);
convertEsmFileToCjs(mjsInstrumentPath, cjsInstrumentPath);
}
convertEsmFileToCjs(mjsScenarioPath, cjsScenarioPath);
convertEsmFileToCjs(mjsInstrumentPath, cjsInstrumentPath);

describe('esm & cjs', () => {
afterAll(() => {
Expand Down