Skip to content

Commit b273848

Browse files
committed
test: improve debugging data
1 parent dc661ab commit b273848

File tree

1 file changed

+7
-2
lines changed

1 file changed

+7
-2
lines changed

tests/specs/api.ts

Lines changed: 7 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -394,7 +394,6 @@ export default testSuite(({ describe }, node: NodeApis) => {
394394
await using fixture = await createFixture({
395395
'package.json': JSON.stringify({ type: 'module' }),
396396
'import.mjs': `
397-
import assert from 'assert';
398397
import { tsImport } from ${JSON.stringify(tsxEsmApiPath)};
399398
const dependenciesA = [];
400399
await tsImport('./file.ts', {
@@ -415,7 +414,13 @@ export default testSuite(({ describe }, node: NodeApis) => {
415414
// wait for async import() to finish
416415
await new Promise((resolve) => setTimeout(resolve, 10));
417416
418-
assert(JSON.stringify(dependenciesA) === JSON.stringify(dependenciesB))
417+
if (JSON.stringify(dependenciesA) !== JSON.stringify(dependenciesB)) {
418+
console.log({
419+
dependenciesA,
420+
dependenciesB,
421+
});
422+
process.exitCode = 1
423+
}
419424
`,
420425
'file.ts': 'import "./foo.ts"; import(\'./bar.ts\')',
421426
'foo.ts': 'console.log(\'foo\' as string)',

0 commit comments

Comments
 (0)