chore: rename action creators to remove "AC"

This commit is contained in:
2024-08-17 19:24:45 +02:00
parent 0fab9d4e0a
commit 7b88633fba
11 changed files with 102 additions and 110 deletions

View File

@@ -1,8 +1,8 @@
import {
appReducer,
InitialStateType,
setAppErrorAC,
setAppStatusAC,
setAppError,
setAppStatus,
} from './app-reducer'
let startState: InitialStateType
@@ -16,11 +16,11 @@ beforeEach(() => {
})
test('correct error message should be set', () => {
const endState = appReducer(startState, setAppErrorAC('some error'))
const endState = appReducer(startState, setAppError('some error'))
expect(endState.error).toBe('some error')
})
test('correct status should be set', () => {
const endState = appReducer(startState, setAppStatusAC('loading'))
const endState = appReducer(startState, setAppStatus('loading'))
expect(endState.status).toBe('loading')
})