Skip to content

Commit 7d1a92b

Browse files
committed
make github mock more accurate
1 parent 7a507ce commit 7d1a92b

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

tests/mocks/github.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -55,7 +55,7 @@ function createGitHubUser(code?: string | null) {
5555
accessToken: `${code}_mock_access_token`,
5656
profile: {
5757
login: faker.internet.username(),
58-
id: faker.string.uuid(),
58+
id: faker.number.int(),
5959
name: faker.person.fullName(),
6060
avatar_url: 'https://github.com/ghost.png',
6161
emails: emails.map((e) => e.email),
@@ -166,7 +166,7 @@ export const handlers: Array<HttpHandler> = [
166166
if (passthroughGitHub) return passthrough()
167167

168168
const mockUser = (await getGitHubUsers()).find(
169-
(u) => u.profile.id === params.id,
169+
(u) => u.profile.id === Number(params.id),
170170
)
171171
if (mockUser) return json(mockUser.profile)
172172

0 commit comments

Comments
 (0)