Skip to content

Commit d3bf68c

Browse files
feat(integrations.mocked): changed the getCurrentUser behavior to always return the same user
1 parent bdb845b commit d3bf68c

File tree

2 files changed

+6
-2
lines changed

2 files changed

+6
-2
lines changed

.changeset/young-cases-play.md

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
---
2+
'@o2s/integrations.mocked': patch
3+
---
4+
5+
changed the `getCurrentUser` behavior to always return the same user

packages/integrations/mocked/src/modules/users/users.mapper.ts

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -81,8 +81,7 @@ export const mapUser = (id?: string): Users.Model.User | undefined => {
8181
if (id) {
8282
return users.find((user) => user.id === id);
8383
}
84-
const randomIndex = Math.floor(Math.random() * users.length);
85-
return users[randomIndex];
84+
return MOCK_USER_2;
8685
};
8786

8887
export const mapUsers = (options: Users.Request.GetUsersQuery): Users.Model.Users => {

0 commit comments

Comments
 (0)