python (65.1k questions)
javascript (44.2k questions)
reactjs (22.7k questions)
java (20.8k questions)
c# (17.4k questions)
html (16.3k questions)
r (13.7k questions)
android (12.9k questions)
Can't create mock constructor for user model
When I'm trying to mock my user model to test my service, the nest console throws this TypeError, but I don't know how 'emulate' the constructor of user model
user.service.spec.ts
import { Test, Testi...
itsDev018
Votes: 0
Answers: 1
How to mock reducers/store on react-testing-library for all tests
In my tests I normally mock each and every dispatch/selector needed for each specific test. But I have one prop on my reducers/store that applies to almost all components. I always import it directly ...
Gabrielle
Votes: 0
Answers: 0
Jest test doesnt wait for a saga to end
Jest for testing,
Redux-Saga
Let's say I have this saga:
export function* callCreateTemplate({payload}){
try{
...
yield delay(1500)
...
}
Don't judge me for having this delay(1500) is related t...
Mauricio Etchevest
Votes: 0
Answers: 1
Issues with mock + multiple exports in the same file on react-testing-library
I am using Jest + React Testing Library in my project, and in one of my components, I have a common index.ts that exports all the internal components like:
src/components/commonComponents/index.ts:
im...
Gabrielle
Votes: 0
Answers: 0