Skip to content

Commit f0d12ae

Browse files
committed
fix: update json mock to be async in authentication tests
1 parent da71d39 commit f0d12ae

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

__tests__/auth.test.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@ describe('authenticate', () => {
1616
mockFetch.mockResolvedValue({
1717
ok: true,
1818
status: 200,
19-
json: () => Promise.resolve({ token: 'ghs_app_123' })
19+
json: async () => Promise.resolve({ token: 'ghs_app_123' })
2020
} as Response)
2121

2222
const result = await authenticate(
@@ -38,7 +38,7 @@ describe('authenticate', () => {
3838
mockFetch.mockResolvedValue({
3939
ok: false,
4040
status: 404,
41-
json: () => Promise.resolve({ error: 'Not installed' })
41+
json: async () => Promise.resolve({ error: 'Not installed' })
4242
} as Response)
4343

4444
const result = await authenticate(

0 commit comments

Comments
 (0)