Skip to content

Commit 722d488

Browse files
authored
test: silence expected errors in integration test (#12456)
1 parent f0145cc commit 722d488

File tree

1 file changed

+9
-0
lines changed

1 file changed

+9
-0
lines changed

integration/defer-test.ts

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -20,6 +20,8 @@ const MANUAL_RESOLVED_ID = "MANUAL_RESOLVED_ID";
2020
const MANUAL_FALLBACK_ID = "MANUAL_FALLBACK_ID";
2121
const MANUAL_ERROR_ID = "MANUAL_ERROR_ID";
2222

23+
let originalConsoleError: typeof console.error;
24+
2325
declare global {
2426
var __deferredManualResolveCache: {
2527
nextId: number;
@@ -537,9 +539,12 @@ test.describe("non-aborted", () => {
537539

538540
// This creates an interactive app using playwright.
539541
appFixture = await createAppFixture(fixture);
542+
originalConsoleError = console.error;
543+
console.error = () => {};
540544
});
541545

542546
test.afterAll(() => {
547+
console.error = originalConsoleError;
543548
appFixture.close();
544549
});
545550

@@ -1205,9 +1210,13 @@ test.describe("aborted", () => {
12051210

12061211
// This creates an interactive app using playwright.
12071212
appFixture = await createAppFixture(fixture);
1213+
1214+
originalConsoleError = console.error;
1215+
console.error = () => {};
12081216
});
12091217

12101218
test.afterAll(() => {
1219+
console.error = originalConsoleError;
12111220
appFixture.close();
12121221
});
12131222

0 commit comments

Comments
 (0)