Skip to content

Commit 87510a3

Browse files
committed
Fix param mismatch in unit test case
1 parent 96da4d0 commit 87510a3

2 files changed

Lines changed: 2 additions & 2 deletions

File tree

src/pages/__tests__/sw.spec.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@ describe('/sw.js route', () => {
77
})
88

99
it('returns a JavaScript service worker response', async () => {
10-
const response = await GET()
10+
const response = await GET({} as Parameters<typeof GET>[0])
1111

1212
expect(response.status).toBe(200)
1313
expect(response.headers.get('Content-Type')).toBe('application/javascript; charset=utf-8')

src/pages/sw.js.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -97,7 +97,7 @@ export const buildServiceWorkerScript = (): string => {
9797
].join('\n')
9898
}
9999

100-
export const GET: APIRoute = () => {
100+
export const GET: APIRoute = _context => {
101101
return new Response(buildServiceWorkerScript(), {
102102
headers: {
103103
'Content-Type': 'application/javascript; charset=utf-8',

0 commit comments

Comments
 (0)