I have been trying to write a jest Unit test for the following line, and cant figure it out. This is React using Redux
export const someState = (state: RootState) => {state.someStore}
I have tried everything I can think of, SpyOn, mock, calling directly. I can get it to pass, but when I run a coverage report, this line is never actually tested.
it('some title', () => {
const state = {
someState: RootState {
someStore: {
data: ''
}
}
}
expect(someState(state)).toBe(state.someStore)
})
Thanks ChatGPT