push
github
79 of 145 branches covered (54.48%)
Branch coverage included in aggregate %.
186 of 251 new or added lines in 9 files covered. (74.1%)
1 existing line in 1 file now uncovered.1360 of 1540 relevant lines covered (88.31%)
2.62 hits per line
|
import { createSlice } from '@reduxjs/toolkit'; |
1✔ |
|
|
1✔ |
|
const initialState = {
|
1✔ |
|
email: '' |
1✔ |
|
}; |
1✔ |
|
|
1✔ |
|
const currentUserSlice = createSlice({
|
1✔ |
|
name: 'currentUser', |
1✔ |
|
initialState: initialState, |
1✔ |
|
reducers: { |
1✔ |
|
setUser: (state, action) => {
|
|
|
state.email = action.payload; |
2✔ |
|
}, |
2✔ |
|
clearUser: (state) => {
|
1✔ |
NEW
|
state.email = '';
|
× |
NEW
|
} |
× |
|
} |
1✔ |
|
}); |
1✔ |
|
|
1✔ |
|
export const { setUser, clearUser } = currentUserSlice.actions; |
1✔ |
|
export default currentUserSlice.reducer; |
1✔ |