web-platform-tests / wpt

Test suites for Web platform specs — including WHATWG, W3C, and others
https://web-platform-tests.org/
Other
4.91k stars 3.06k forks source link

assert_implements appends "undefined" to the failure message #25036

Open foolip opened 4 years ago

foolip commented 4 years ago

An example of this: https://wpt.fyi/results/largest-contentful-paint/toJSON.html?run_id=661940001&run_id=657990002&run_id=657990003

The failure message is "assert_implements: LargestContentfulPaint is not implemented undefined"

This is unsightly, but was also briefly confusing to me in another as I thought the undefined was describing the first argument, which I thought was undefined. It seems like the origin is actually error here: https://github.com/web-platform-tests/wpt/blob/478ce413e12b2267748a2f4e1137ebe466332f04/resources/testharness.js#L3608-L3620

Some tweak to avoid using error when undefined would presumably fix this, but I don't what else would be affected.

foolip commented 4 years ago

@stephenmcgruer can you give this a priority label, since you added assert_implements?