Skip to content

Commit fffc2c2

Browse files
committed
remove one level of nesting of describe calls
1 parent 1175539 commit fffc2c2

File tree

1 file changed

+8
-10
lines changed
  • dev-packages/node-integration-tests/utils

1 file changed

+8
-10
lines changed

dev-packages/node-integration-tests/utils/runner.ts

Lines changed: 8 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -194,7 +194,12 @@ export function createEsmAndCjsTests(
194194
convertEsmFileToCjs(mjsScenarioPath, cjsScenarioPath);
195195
convertEsmFileToCjs(mjsInstrumentPath, cjsInstrumentPath);
196196

197-
describe('esm & cjs', () => {
197+
describe('esm', () => {
198+
const testFn = options?.failsOnEsm ? test.fails : test;
199+
callback(() => createRunner(mjsScenarioPath).withFlags('--import', mjsInstrumentPath), testFn, 'esm');
200+
});
201+
202+
describe('cjs', () => {
198203
afterAll(() => {
199204
try {
200205
unlinkSync(cjsInstrumentPath);
@@ -208,15 +213,8 @@ export function createEsmAndCjsTests(
208213
}
209214
});
210215

211-
describe('esm', () => {
212-
const testFn = options?.failsOnEsm ? test.fails : test;
213-
callback(() => createRunner(mjsScenarioPath).withFlags('--import', mjsInstrumentPath), testFn, 'esm');
214-
});
215-
216-
describe('cjs', () => {
217-
const testFn = options?.failsOnCjs ? test.fails : test;
218-
callback(() => createRunner(cjsScenarioPath).withFlags('--require', cjsInstrumentPath), testFn, 'cjs');
219-
});
216+
const testFn = options?.failsOnCjs ? test.fails : test;
217+
callback(() => createRunner(cjsScenarioPath).withFlags('--require', cjsInstrumentPath), testFn, 'cjs');
220218
});
221219
}
222220

0 commit comments

Comments
 (0)