Browse Source

Ensuring a few more mocks

Kirk Trombley 4 years ago
parent
commit
652ff07c9e
2 changed files with 3 additions and 2 deletions
  1. 3 0
      client/src/setupTests.js
  2. 0 2
      client/src/tests/apiMethods.test.js

+ 3 - 0
client/src/setupTests.js

@@ -32,9 +32,12 @@ global.google = {
     Polyline: fakeClass,
     Marker: fakeClass,
     Point: fakeClass,
+    StreetViewPanorama: fakeClass,
   },
 };
 
+global.fetch = jest.fn();
+
 jest.useFakeTimers();
 
 window.open = jest.fn();

+ 0 - 2
client/src/tests/apiMethods.test.js

@@ -15,8 +15,6 @@ import {
   sendTimeout,
 } from "../domain/apiMethods";
 
-global.fetch = jest.fn();
-
 describe("apiMethods", () => {
   describe("getStatus", () => {
     it("gets status", async () => {