Bug 1786197 - Turn on ESLint rule for prefer-boolean-length-check for modules. r=valentin

Differential Revision: https://phabricator.services.mozilla.com/D155172
This commit is contained in:
Mark Banner 2022-08-26 13:39:37 +00:00
parent baa8dfdef9
commit 9ed9c3503d
5 changed files with 6 additions and 7 deletions

View File

@ -480,7 +480,6 @@ module.exports = {
"dom/**",
"image/test/browser/browser_image.js",
"layout/**",
"modules/**",
"netwerk/**",
"remote/**",
"storage/test/unit/test_vacuum.js",

View File

@ -38,6 +38,6 @@ function run_test() {
zipreader.close();
zipreader = null;
Cu.forceGC();
Assert.ok(stream.read(1024).length > 0);
Assert.ok(dirstream.read(100).length > 0);
Assert.ok(!!stream.read(1024).length);
Assert.ok(!!dirstream.read(100).length);
}

View File

@ -124,7 +124,7 @@ add_task(async function test() {
Assert.throws(
() => {
while (true) {
Assert.ok(stream.read(1024).length > 0);
Assert.ok(!!stream.read(1024).length);
}
},
/NS_ERROR_FAILURE/,

View File

@ -37,6 +37,6 @@ function run_test() {
zipreader.close();
zipreader = null;
Cu.forceGC();
Assert.ok(stream.read(1024).length > 0);
Assert.ok(dirstream.read(100).length > 0);
Assert.ok(!!stream.read(1024).length);
Assert.ok(!!dirstream.read(100).length);
}

View File

@ -91,7 +91,7 @@ function run_tests(obj) {
*/
function createMAR(outMAR, dataDir, files) {
// You cannot create an empy MAR.
Assert.ok(files.length > 0);
Assert.ok(!!files.length);
// Get an nsIProcess to the signmar binary.
let process = Cc["@mozilla.org/process/util;1"].createInstance(Ci.nsIProcess);