code link
: cartsReducer test
In Redux, action creators are functions which return plain objects. Our recommendation is not to write action creators manually, but instead have them generated automatically by createSlice, or created via createAction from @reduxjs/toolkit. As such, you should not feel the need to test action creators by themselves (the Redux Toolkit maintainers have already done that for you!).
와우! 액션 생성에 대한 테스트는 할 필요가 없다고 한다. createSlice
, createAction
에서 스스로 생성해주기 때문... 이미 rtk
에서 테스트를 했다고하니 믿고 테스트하지 않아도 될 것 같다...