Bug 1407968 - Add an exception for ESLint no-self-compare in test_complex_keyPaths.js as the comparisons are intentional. r?bevis draft
authorMark Banner <standard8@mozilla.com>
Fri, 13 Oct 2017 09:47:17 +0100
changeset 679957 7184f67548d81b8c085b4a4a9bd164d085c24f46
parent 679629 25aad10380b10b6efa50c2b4d97245f078d870a0
child 735728 87d0f485e84eb2139f80a84696caf71cdf96204e
push id84360
push userbmo:standard8@mozilla.com
push dateFri, 13 Oct 2017 08:48:06 +0000
reviewersbevis
bugs1407968
milestone58.0a1
Bug 1407968 - Add an exception for ESLint no-self-compare in test_complex_keyPaths.js as the comparisons are intentional. r?bevis MozReview-Commit-ID: 7rSKeU9qtja
dom/indexedDB/test/unit/test_complex_keyPaths.js
--- a/dom/indexedDB/test/unit/test_complex_keyPaths.js
+++ b/dom/indexedDB/test/unit/test_complex_keyPaths.js
@@ -80,16 +80,17 @@ function* testSteps()
     let test = " for objectStore test " + JSON.stringify(info);
     let indexName = JSON.stringify(info.keyPath);
     if (!stores[indexName]) {
       try {
         let objectStore = db.createObjectStore(indexName, { keyPath: info.keyPath });
         ok(!("exception" in info), "shouldn't throw" + test);
         is(JSON.stringify(objectStore.keyPath), JSON.stringify(info.keyPath),
            "correct keyPath property" + test);
+        // eslint-disable-next-line no-self-compare
         ok(objectStore.keyPath === objectStore.keyPath,
            "object identity should be preserved");
         stores[indexName] = objectStore;
       } catch (e) {
         ok("exception" in info, "should throw" + test);
         is(e.name, "SyntaxError", "expect a SyntaxError" + test);
         ok(e instanceof DOMException, "Got a DOM Exception" + test);
         is(e.code, DOMException.SYNTAX_ERR, "expect a syntax error" + test);
@@ -169,16 +170,17 @@ function* testSteps()
     let test = " for index test " + JSON.stringify(info);
     let indexName = JSON.stringify(info.keyPath);
     if (!indexes[indexName]) {
       try {
         let index = store.createIndex(indexName, info.keyPath);
         ok(!("exception" in info), "shouldn't throw" + test);
         is(JSON.stringify(index.keyPath), JSON.stringify(info.keyPath),
            "index has correct keyPath property" + test);
+        // eslint-disable-next-line no-self-compare
         ok(index.keyPath === index.keyPath,
            "object identity should be preserved");
         indexes[indexName] = index;
       } catch (e) {
         ok("exception" in info, "should throw" + test);
         is(e.name, "SyntaxError", "expect a SyntaxError" + test);
         ok(e instanceof DOMException, "Got a DOM Exception" + test);
         is(e.code, DOMException.SYNTAX_ERR, "expect a syntax error" + test);