Bug 1466497 - Enable ESLint rule require-expected-throws-or-rejects for head_devtools_inspector_sidebar.js. r=jdescottes
authorMark Banner <standard8@mozilla.com>
Fri, 01 Jun 2018 12:49:41 +0100
changeset 475569 c9c090ac9e2461e17d0333a7f10ae087c9315c99
parent 475568 22c2645c283cbff140a25290936e2d3ccb4698bf
child 475570 e83a2d180ff5f128313c53d68af82ba48cea7cbf
push id9374
push userjlund@mozilla.com
push dateMon, 18 Jun 2018 21:43:20 +0000
treeherdermozilla-beta@160e085dfb0b [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersjdescottes
bugs1466497
milestone62.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
Bug 1466497 - Enable ESLint rule require-expected-throws-or-rejects for head_devtools_inspector_sidebar.js. r=jdescottes MozReview-Commit-ID: LnOPs92HNPK
.eslintrc.js
devtools/client/inspector/extensions/test/head_devtools_inspector_sidebar.js
--- a/.eslintrc.js
+++ b/.eslintrc.js
@@ -47,17 +47,16 @@ module.exports = {
     ],
     "rules": {
       "mozilla/no-define-cc-etc": "off",
     }
   }, {
     // XXX Bug 1452706. These directories are still being fixed, so turn off
     //  mozilla/require-expected-throws-or-rejects for now.
     "files": [
-      "devtools/client/inspector/extensions/test/head_devtools_inspector_sidebar.js",
       "storage/test/unit/**",
     ],
     "rules": {
       "mozilla/require-expected-throws-or-rejects": "off",
     }
   }, {
     // XXX Bug 1452706. These directories are still being fixed, so turn off
     //  mozilla/require-expected-throws-or-rejects for now.
--- a/devtools/client/inspector/extensions/test/head_devtools_inspector_sidebar.js
+++ b/devtools/client/inspector/extensions/test/head_devtools_inspector_sidebar.js
@@ -35,17 +35,17 @@ function getExtensionSidebarActors(inspe
 
 // Test that the specified objectValueGrip actors have been released
 // on the remote debugging server
 // (used in browser_ext_devtools_panels_elements_sidebar.js).
 async function expectNoSuchActorIDs(client, actors) {
   info(`Test that all the objectValueGrip actors have been released`);
   for (const actor of actors) {
     await Assert.rejects(client.request({to: actor, type: "requestTypes"}),
-                         `No such actor for ID: ${actor}`);
+                         err => err.message == `No such actor for ID: ${actor}`);
   }
 }
 
 function waitForObjectInspector(panelDoc, waitForNodeWithType = "object") {
   const selector = `.object-inspector .objectBox-${waitForNodeWithType}`;
   return ContentTaskUtils.waitForCondition(() => {
     return panelDoc.querySelectorAll(selector).length > 0;
   });