[gold] test_util.js: Remove expectNoUnmatchedCalls and all references.

Last week we established that fetchMock will report any unmatched calls and make tests with any such calls fail.

Let's remove expectNoUnmatchedCalls and rely on fetchMock's built in reporting instead.

Bug: skia: 9525
Change-Id: I2fed43a7fd6033cc78fcc56b665f20b0ac6545fb
Reviewed-on: https://skia-review.googlesource.com/c/buildbot/+/265152
Reviewed-by: Kevin Lubick <kjlubick@google.com>
Commit-Queue: Leandro Lovisolo <lovisolo@google.com>
diff --git a/golden/modules/byblame-page-sk/byblame-page-sk_test.js b/golden/modules/byblame-page-sk/byblame-page-sk_test.js
index 4c12947..e23adc8 100644
--- a/golden/modules/byblame-page-sk/byblame-page-sk_test.js
+++ b/golden/modules/byblame-page-sk/byblame-page-sk_test.js
@@ -2,7 +2,7 @@
 
 import { $, $$ } from 'common-sk/modules/dom'
 import { canvaskit, gm, svg, fakeGitlogRpc, trstatus } from './demo_data'
-import { eventPromise, expectNoUnmatchedCalls, expectQueryStringToEqual } from '../test_util'
+import { eventPromise, expectQueryStringToEqual } from '../test_util'
 import { fetchMock } from 'fetch-mock';
 
 describe('byblame-page-sk', () => {
@@ -50,7 +50,6 @@
       byblamePageSk = null;
     }
     expect(fetchMock.done()).to.be.true; // All mock RPCs called at least once.
-    expectNoUnmatchedCalls(fetchMock);
     // Remove fetch mocking to prevent test cases interfering with each other.
     fetchMock.reset();
   });
diff --git a/golden/modules/changelists-page-sk/changelists-page-sk_test.js b/golden/modules/changelists-page-sk/changelists-page-sk_test.js
index d12d720..efa9455 100644
--- a/golden/modules/changelists-page-sk/changelists-page-sk_test.js
+++ b/golden/modules/changelists-page-sk/changelists-page-sk_test.js
@@ -7,7 +7,7 @@
   changelistSummaries_5_offset10,
   empty
 } from './test_data';
-import { eventPromise, expectNoUnmatchedCalls, expectQueryStringToEqual } from '../test_util';
+import { eventPromise, expectQueryStringToEqual } from '../test_util';
 import { fetchMock }  from 'fetch-mock';
 
 describe('changelists-page-sk', () => {
@@ -114,10 +114,7 @@
         ele._page_size = 10;
         ele._showAll = true;
 
-        ele._fetch().then(() => {
-          expectNoUnmatchedCalls(fetchMock);
-          done();
-        });
+        ele._fetch().then(done);
       });
     });
 
@@ -131,10 +128,7 @@
         ele._page_size = 10;
         ele._showAll = false;
 
-        ele._fetch().then(() => {
-          expectNoUnmatchedCalls(fetchMock);
-          done();
-        });
+        ele._fetch().then(done);
       });
     });
   }); // end describe('api calls')
@@ -224,8 +218,6 @@
         showAllBox.click();
         expect(ele._showAll).to.equal(true);
         expectQueryStringToEqual('?page_size=50&show_all=true');
-
-        expectNoUnmatchedCalls(fetchMock);
         done();
       });
     });
diff --git a/golden/modules/ignores-page-sk/ignores-page-sk_test.js b/golden/modules/ignores-page-sk/ignores-page-sk_test.js
index 3099068..1ba81fe 100644
--- a/golden/modules/ignores-page-sk/ignores-page-sk_test.js
+++ b/golden/modules/ignores-page-sk/ignores-page-sk_test.js
@@ -1,7 +1,7 @@
 import './index.js';
 
 import { $, $$ } from 'common-sk/modules/dom';
-import { eventPromise, expectNoUnmatchedCalls, expectQueryStringToEqual } from '../test_util';
+import { eventPromise, expectQueryStringToEqual } from '../test_util';
 import { fakeNow, ignoreRules_10 } from './test_data';
 import { fetchMock }  from 'fetch-mock';
 
@@ -25,7 +25,6 @@
 
   afterEach(function () {
     expect(fetchMock.done()).to.be.true; // All mock RPCs called at least once.
-    expectNoUnmatchedCalls(fetchMock);
 
     // Completely remove the mocking which allows each test
     // to be able to mess with the mocked routes w/o impacting other tests.
@@ -180,4 +179,4 @@
   const event = eventPromise('end-task');
   history.forward();
   return event;
-}
\ No newline at end of file
+}
diff --git a/golden/modules/test_util.js b/golden/modules/test_util.js
index 2bfd897..82308e0 100644
--- a/golden/modules/test_util.js
+++ b/golden/modules/test_util.js
@@ -7,24 +7,6 @@
  * </p>
  */
 
-import { UNMATCHED } from 'fetch-mock';
-
-/** expectNoUnmatchedCalls asserts that there were no
- *  unexpected (unmatched) calls to fetchMock.
- */
-export function expectNoUnmatchedCalls(fetchMock) {
-    let calls = fetchMock.calls(UNMATCHED, 'GET');
-    expect(calls.length, 'no unmatched (unexpected) GETs').to.equal(0);
-    if (calls.length) {
-      console.warn('unmatched GETS', calls);
-    }
-    calls = fetchMock.calls(UNMATCHED, 'POST');
-    expect(calls.length, 'no unmatched (unexpected) POSTs').to.equal(0);
-    if (calls.length) {
-      console.warn('unmatched POSTS', calls);
-    }
-}
-
 /**
  * Returns a promise that will resolve when the given DOM event is caught at the
  * document's body element, or reject if the event isn't caught within the given
@@ -148,9 +130,9 @@
   });
 }
 
-/** expectQueryStringToEqual asserts that there the given string
- *  exactly matches the current query string of the url bar.
- *  For example, expectQueryStringToEqual('?foo=bar&foo=orange');
+/**
+ * Asserts that there the given string exactly matches the current query string
+ * of the url bar. For example, expectQueryStringToEqual('?foo=bar&foo=orange');
  */
 export function expectQueryStringToEqual(expected) {
   expect(window.location.search).to.equal(expected);
diff --git a/golden/modules/triagelog-page-sk/triagelog-page-sk_test.js b/golden/modules/triagelog-page-sk/triagelog-page-sk_test.js
index f81543f..30e12541 100644
--- a/golden/modules/triagelog-page-sk/triagelog-page-sk_test.js
+++ b/golden/modules/triagelog-page-sk/triagelog-page-sk_test.js
@@ -8,7 +8,7 @@
   secondPage,
   thirdPage,
 } from './test_data'
-import { eventPromise, expectNoUnmatchedCalls, expectQueryStringToEqual } from '../test_util'
+import { eventPromise, expectQueryStringToEqual } from '../test_util'
 import { fetchMock } from 'fetch-mock';
 
 fetchMock.config.overwriteRoutes = true;
@@ -44,7 +44,6 @@
       triagelogPageSk = null;
     }
     expect(fetchMock.done()).to.be.true;  // All mock RPCs called at least once.
-    expectNoUnmatchedCalls(fetchMock);
     // Remove fetch mocking to prevent test cases interfering with each other.
     fetchMock.reset();
   });