Skip to content
This repository has been archived by the owner on Feb 12, 2022. It is now read-only.

Fix test runner and don't swallow invariant failures #2155

Closed
wants to merge 1 commit into from

Conversation

hermanventer
Copy link
Contributor

Release note: Fix test runner and don't swallow invariant failures

The recent changes to make the serializer test runner deal with promises, caused it to list every test that follows a failing test as also failing.

I've also noticed that invariant failures can get swallowed. And as a result of that some test cases that should have failed with false invariants showed up as passing.

Those failures were recently introduced by PR #2134. It boils down to a single line fix, which is also included with this.

Copy link
Contributor

@trueadm trueadm left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

src/realm.js Outdated
@@ -885,6 +887,7 @@ export class Realm {
effects1 = Widen.widenEffects(this, effects1, effects2);
}
} catch (e) {
if (e instanceof InvariantError) throw e;
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Why would it ever be okay to swallow random errors? What about SyntaxError or RangeError or TypeError? Any error that we don't know if benign for sure is by default a bug.

Copy link

@facebook-github-bot facebook-github-bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@hermanventer is landing this pull request. If you are a Facebook employee, you can view this diff on Phabricator.

@hermanventer hermanventer deleted the fixrunner branch July 3, 2018 01:26
@hermanventer hermanventer restored the fixrunner branch July 3, 2018 01:26
@hermanventer hermanventer deleted the fixrunner branch July 3, 2018 01:27
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

4 participants