Archived
1
0

Update register.test.ts

This commit is contained in:
cuining 2021-07-25 14:49:19 +08:00 committed by GitHub
parent d71649acb4
commit 4e489f19b5
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -155,7 +155,7 @@ describe("register", () => {
await registerServiceWorker() await registerServiceWorker()
expect(mockFn).toBeCalled() expect(mockFn).toBeCalled()
expect(serviceWorkerPath).toMatch(`${csStaticBasePath}/dist/serviceWorker.js`) expect(serviceWorkerPath).toMatch(`${csStaticBasePath}/out/browser/serviceWorker.js`)
expect(serviceWorkerScope).toMatch("/") expect(serviceWorkerScope).toMatch("/")
}) })
it("should register when options.base is defined", async () => { it("should register when options.base is defined", async () => {
@ -176,7 +176,7 @@ describe("register", () => {
await registerServiceWorker() await registerServiceWorker()
expect(mockFn).toBeCalled() expect(mockFn).toBeCalled()
expect(serviceWorkerPath).toMatch(`/dist/serviceWorker.js`) expect(serviceWorkerPath).toMatch(`/out/browser/serviceWorker.js`)
expect(serviceWorkerScope).toMatch("/") expect(serviceWorkerScope).toMatch("/")
}) })
}) })