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.
This commit is contained in:
Dmitry Gozman 2021-06-08 16:27:44 -07:00 committed by GitHub
parent aa2546592d
commit e707207d6f
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -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);
});
});