/
pellya
/
blogReactera
Обзор
Документация
Войти
/
pellya
/
blogReactera
Код
Запросы
0
Задачи
Вики
Пакеты
0
Релизы
0
CI/CD
Аналитика
Безопасность
master
src/features/AddCommentForm/model/slices/addCommentFormSlice.test.ts
31 строка
967 B
rpellya@gmail.com
Add prettier
02 фев 2025, 22:40
02 фев 2025, 22:40
5f9ec21
Код
Авторство
О чём код?
import { AddCommentFormSchema } from '../types/addCommentForm'; import { addCommentFormActions, addCommentFormReducer, } from './addCommentFormSlice'; describe('addCommentFormSlice.test', () => { test('Test add comment', () => { const state: DeepPartial<AddCommentFormSchema> = { text: 'test comment', }; expect( addCommentFormReducer( state as AddCommentFormSchema, addCommentFormActions.setText('test comment'), ), ).toEqual({ text: 'test comment' }); }); test('Test update profile service fulfilled', () => { const state: DeepPartial<AddCommentFormSchema> = { error: 'test error', }; expect( addCommentFormReducer( state as AddCommentFormSchema, addCommentFormActions.setText(''), ), ).toEqual({ error: 'test error', text: '' }); }); });