Skip to content

Commit

Permalink
test: improve debugging data
Browse files Browse the repository at this point in the history
  • Loading branch information
privatenumber committed May 11, 2024
1 parent dc661ab commit b273848
Showing 1 changed file with 7 additions and 2 deletions.
9 changes: 7 additions & 2 deletions tests/specs/api.ts
Original file line number Diff line number Diff line change
Expand Up @@ -394,7 +394,6 @@ export default testSuite(({ describe }, node: NodeApis) => {
await using fixture = await createFixture({
'package.json': JSON.stringify({ type: 'module' }),
'import.mjs': `
import assert from 'assert';
import { tsImport } from ${JSON.stringify(tsxEsmApiPath)};
const dependenciesA = [];
await tsImport('./file.ts', {
Expand All @@ -415,7 +414,13 @@ export default testSuite(({ describe }, node: NodeApis) => {
// wait for async import() to finish
await new Promise((resolve) => setTimeout(resolve, 10));
assert(JSON.stringify(dependenciesA) === JSON.stringify(dependenciesB))
if (JSON.stringify(dependenciesA) !== JSON.stringify(dependenciesB)) {
console.log({
dependenciesA,
dependenciesB,
});
process.exitCode = 1
}
`,
'file.ts': 'import "./foo.ts"; import(\'./bar.ts\')',
'foo.ts': 'console.log(\'foo\' as string)',
Expand Down

0 comments on commit b273848

Please sign in to comment.