Bug 1407968 - Add an exception for ESLint no-self-compare in test_complex_keyPaths.js as the comparisons are intentional. r=bevis
authorMark Banner <standard8@mozilla.com>
Fri, 13 Oct 2017 09:47:17 +0100
changeset 386017 885aeb78d65267247d3717c8e02e3364eaf3693a
parent 386016 84907247d8f56fd7c92a341e5c70c670fb78eaa1
child 386018 50557e43a2086a7ac6950edb15c7ba53bb4b3bd8
push id53246
push usermbanner@mozilla.com
push dateFri, 13 Oct 2017 09:11:05 +0000
treeherderautoland@885aeb78d652 [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersbevis
bugs1407968
milestone58.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 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);