feat: add tests for registerServiceWorker

This commit is contained in:
Joe Previte
2021-04-23 16:31:56 -07:00
parent 5ad8e686bc
commit 6f2709bcaa
2 changed files with 95 additions and 1 deletions

View File

@ -16,7 +16,7 @@ import { loggerModule } from "../utils/helpers"
const dom = new JSDOM()
global.document = dom.window.document
type LocationLike = Pick<Location, "pathname" | "origin">
export type LocationLike = Pick<Location, "pathname" | "origin">
// jest.mock is hoisted above the imports so we must use `require` here.
jest.mock("@coder/logger", () => require("../utils/helpers").loggerModule)