Skip to content

Commit 707cb96

Browse files
authored
test: filter the tsconfig error log (#1039)
1 parent 82433b9 commit 707cb96

File tree

1 file changed

+5
-1
lines changed

1 file changed

+5
-1
lines changed

tests/integration/dts/index.test.ts

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -163,7 +163,11 @@ describe('dts when bundle: false', () => {
163163
try {
164164
await buildAndGetResults({ fixturePath, type: 'dts' });
165165
} catch (err: any) {
166-
expect(logs.map((log) => stripAnsi(log)).join('')).toMatchInlineSnapshot(
166+
expect(
167+
logs
168+
.map((log) => stripAnsi(log))
169+
.find((log) => log.includes('Failed to resolve tsconfig file')),
170+
).toMatchInlineSnapshot(
167171
`"error Failed to resolve tsconfig file "<ROOT>/tests/integration/dts/bundle-false/tsconfig-path/path_not_exist/tsconfig.json" from <ROOT>/tests/integration/dts/bundle-false/tsconfig-path. Please ensure that the file exists."`,
168172
);
169173
}

0 commit comments

Comments
 (0)