• Home
  • Features
  • Pricing
  • Docs
  • Announcements
  • Sign In

atlp-rwanda / vikings-ec-fe / a2e058da-2c78-40f1-b0d3-0ffea5a6daab

pending completion
a2e058da-2c78-40f1-b0d3-0ffea5a6daab

push

circleci

GitHub
feat: update password (#17)

51 of 104 branches covered (49.04%)

Branch coverage included in aggregate %.

30 of 30 new or added lines in 3 files covered. (100.0%)

407 of 476 relevant lines covered (85.5%)

7.44 hits per line

Source File
Press 'n' to go to next uncovered line, 'b' for previous

94.44
/src/features/auth/updatePasswordSlice.js
1
import { createSlice, createAsyncThunk } from '@reduxjs/toolkit';
2
import axios from '../api/customAxios';
3

4
export const updatePassword = createAsyncThunk(
21✔
5
  'updatePassword',
6
  async (passwordData, { rejectWithValue }) => {
7
    try {
2✔
8
      const { data } = await axios.patch('/users/update-password', passwordData);
2✔
9
      return data;
×
10
    } catch (err) {
11
      return rejectWithValue(err);
1✔
12
    }
13
  },
14
);
15
const initialState = {
21✔
16
  data: null,
17
  isLoading: false,
18
  error: null,
19
};
20

21
const updatePasswordSlice = createSlice({
21✔
22
  name: 'updatePassword',
23
  initialState,
24
  extraReducers: (builer) => {
25
    builer
21✔
26
      .addCase(updatePassword.pending, (state) => {
27
        state.isLoading = true;
2✔
28
        state.data = null;
2✔
29
        state.error = null;
2✔
30
      })
31
      .addCase(updatePassword.fulfilled, (state, action) => {
32
        state.data = action.payload;
1✔
33
        state.isLoading = false;
1✔
34
        state.error = null;
1✔
35
      })
36
      .addCase(updatePassword.rejected, (state, action) => {
37
        state.data = null;
1✔
38
        state.isLoading = false;
1✔
39
        state.error = action.payload;
1✔
40
      });
41
  },
42
});
43
export const updatePasswordActions = (state) => state.updatePassword.data;
21✔
44

45
export default updatePasswordSlice.reducer;
STATUS · Troubleshooting · Open an Issue · Sales · Support · CAREERS · ENTERPRISE · START FREE · SCHEDULE DEMO
ANNOUNCEMENTS · TWITTER · TOS & SLA · Supported CI Services · What's a CI service? · Automated Testing

© 2026 Coveralls, Inc