Open Bug 1426145 Opened 6 years ago Updated 6 months ago

Fail mochitests tests in case of unexpected TypeError, ReferenceError, SyntaxError

Categories

(Testing :: General, defect, P3)

Version 3
defect

Tracking

(Not tracked)

People

(Reporter: Yoric, Unassigned)

References

(Depends on 1 open bug, Blocks 1 open bug)

Details

Attachments

(1 file)

      No description provided.
Priority: -- → P3

This patch ensures that if we have raised a TypeError, SyntaxError or RangeError, we fail the test, even if the error was accidentally caught. This behavior can be deactivated manually as follows:

  • either by manually calling ChromeUtils.clearRecentJSDevError() after having thrown the error (recommended if the test expected the error to be thrown);
  • or by calling PromiseUtils.thisTestLeaksUncaughtRejectionsAndShouldBeFixed() to postpone fixing the issue.

Depends on D94973

Assignee: nobody → dteller
Status: NEW → ASSIGNED

ahal, you're now in charge :)

Assignee: D.O.Teller+bugspam → nobody
Status: ASSIGNED → NEW
Flags: needinfo?(ahal)

This is on our team's radar. Can't commit to a time frame at this time.

Flags: needinfo?(ahal)
Severity: normal → S3
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: