From c1c9442519769a647d7ac824c3d48f7c13a2989b Mon Sep 17 00:00:00 2001 From: neverland Date: Thu, 5 Jun 2025 13:30:02 +0800 Subject: [PATCH] test: filter tsconfig log --- tests/integration/dts/index.test.ts | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/tests/integration/dts/index.test.ts b/tests/integration/dts/index.test.ts index 89d62d30c..a16295b52 100644 --- a/tests/integration/dts/index.test.ts +++ b/tests/integration/dts/index.test.ts @@ -163,7 +163,11 @@ describe('dts when bundle: false', () => { try { await buildAndGetResults({ fixturePath, type: 'dts' }); } catch (err: any) { - expect(logs.map((log) => stripAnsi(log)).join('')).toMatchInlineSnapshot( + expect( + logs + .map((log) => stripAnsi(log)) + .find((log) => log.includes('Failed to resolve tsconfig file')), + ).toMatchInlineSnapshot( `"error Failed to resolve tsconfig file "/tests/integration/dts/bundle-false/tsconfig-path/path_not_exist/tsconfig.json" from /tests/integration/dts/bundle-false/tsconfig-path. Please ensure that the file exists."`, ); }