From e707207d6f2ac9a71029ec1b9b5486a3ca0f2a65 Mon Sep 17 00:00:00 2001 From: Dmitry Gozman Date: Tue, 8 Jun 2021 16:27:44 -0700 Subject: [PATCH] test: update evaluate-no-stall test to get a proper error (#6973) This test is flaky, and gives us "expected true, got false". We should see the actual error message instead. --- tests/page/page-evaluate-no-stall.spec.ts | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/tests/page/page-evaluate-no-stall.spec.ts b/tests/page/page-evaluate-no-stall.spec.ts index fdedbda275..f513aad3b8 100644 --- a/tests/page/page-evaluate-no-stall.spec.ts +++ b/tests/page/page-evaluate-no-stall.spec.ts @@ -48,7 +48,9 @@ test.describe('non-stalling evaluate', () => { if (error === 4) return; // Testing this as a race. - const success = error.message === 'Frame does not yet have a main execution context' || error.message === 'Frame is currently attempting a navigation'; - expect(success).toBeTruthy(); + expect([ + 'Frame does not yet have a main execution context', + 'Frame is currently attempting a navigation' + ]).toContain(error.message); }); });