Bug 1466497 - Enable ESLint rule require-expected-throws-or-rejects for head_devtools_inspector_sidebar.js. r?jdescottes
MozReview-Commit-ID: LnOPs92HNPK
--- 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;
});