author | Mark Banner <standard8@mozilla.com> |
Tue, 01 May 2018 15:36:51 +0100 | |
changeset 417475 | 83fb6c53e740cd7d3f8125a684cb5851c5ef4dd8 |
parent 417474 | 03ee745ee8e2aa9c1ad602c2881be128b956f1e7 |
child 417476 | 3b84be9ee9e6a19d8e49aa86b71c9d60b5eaec8b |
push id | 33968 |
push user | ebalazs@mozilla.com |
push date | Wed, 09 May 2018 09:32:53 +0000 |
treeherder | mozilla-central@a2eccfbeb0ae [default view] [failures only] |
perfherder | [talos] [build metrics] [platform microbench] (compared to previous push) |
reviewers | Gijs |
bugs | 1458235 |
milestone | 62.0a1 |
first release with | nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
|
last release without | nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
|
--- a/testing/modules/Assert.jsm +++ b/testing/modules/Assert.jsm @@ -189,16 +189,21 @@ proto.setReporter = function(reporterFun * @param message (optional) * (string) Short explanation of the expected result * @param operator (optional) * (string) Operation qualifier used by the assertion method (ex: '==') * @param truncate (optional) [true] * (boolean) Whether or not `actual` and `expected` should be truncated when printing */ proto.report = function(failed, actual, expected, message, operator, truncate = true) { + // Although not ideal, we allow a "null" message due to the way some of the extension tests + // work. + if (message !== undefined && message !== null && typeof message != "string") { + this.ok(false, `Expected a string or undefined for the error message to Assert.*, got ${typeof message}`); + } let err = new Assert.AssertionError({ message, actual, expected, operator, truncate }); if (!this._reporter) {