Closed Bug 2079595 Opened 1 month ago Closed 11 days ago

[wpt-sync] Sync PR 63364 - Improve output when WebExtensions tests fail

Categories

(Testing :: web-platform-tests, task, P4)

task

Tracking

(firefox163 fixed)

RESOLVED FIXED
163 Branch
Tracking Status
firefox163 --- fixed

People

(Reporter: wpt-sync, Unassigned)

References

()

Details

(Whiteboard: [wptsync downstream])

Sync web-platform-tests PR 63364 into mozilla-central (this bug is closed when the sync is complete).

PR: https://github.com/web-platform-tests/wpt/pull/63364
Details from upstream follow.

Dave Vandyke <kzar@kzar.co.uk> wrote:

Improve output when WebExtensions tests fail

Previously, when WebExtensions tests failed the message was wrapped with a
confusing message about a true vs false assertion. That made understanding the
failure harder than it needed to be. For example, on Firefox:

async function testName() {
  browser.test.assertEq(1, 0, "description");
},

// => FAIL testName - assert_true: description - Expected: 1, Actual: 0 expected true got false
async function testName() {
  foo;
},

// => FAIL testName - assert_true: Exception running testName: foo is not defined expected true got false

Furthermore, I noticed that for Chrome part of the failure message was
duplicated too, for example:

async function testName() {
  bar;
},

// => FAIL testName - assert_true: Exception running testName: bar is not defined: ReferenceError: bar is not defined. Exception running testName: bar is not defined: ReferenceError: bar is not defined

Let's fix both of those issues, so test failures like that are a bit easier to
understand!

See also https://bugzilla.mozilla.org/show_bug.cgi?id=2078821

The PR was not expected to affect any tests, but the try push wasn't a success. Check the try results for infrastructure issues

Test result changes from PR not available.

Status: NEW → RESOLVED
Closed: 11 days ago
Resolution: --- → FIXED
Target Milestone: --- → 163 Branch
You need to log in before you can comment on or make changes to this bug.