Skip to content

Conversation

@vlapchenko
Copy link

No description provided.

export const ReducerRecord = Record({
user: null
user: null,
signInAttemptCount: 0
Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Вот это можно на уровне саги делать, не обязательно в сторе хранить


api.signIn = jest
.fn()
.mockImplementation((email, password) => Promise.resolve(user))
Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Ок, но идея в том, что тут юнит тесты не нуждаются в моках. А это уже интеграционные

return state.set('user', payload.user)

case SIGN_IN_ATTEMPT_COUNT_INC:
return state.set(
Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

.update

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants