python (12.9k questions)
javascript (9.2k questions)
reactjs (4.7k questions)
java (4.2k questions)
java (4.2k questions)
c# (3.5k questions)
c# (3.5k questions)
html (3.3k questions)
Cannot spyOn on a primitive value; undefined given - Testing a function execution in onChange in connected component
New to testing and This is a connected component using redux. I am testing if the maskPromoCode function is called. With the current test code, the error says: Cannot spyOn on a primitive value; undef...
DollyBeeBee
Votes: 0
Answers: 1
Jest/Enzyme TypeError: (0 , _store.configureStore) is not a function
This is my first time testing a react component with redux store related stuff and really confused on pretty much everything.
Tried all google research and still not knowing what to do.
The component ...
DollyBeeBee
Votes: 0
Answers: 1
Why is mapped children component not rendering in enzyme wrapper using mount?
I have a component(ExpansionView) that renders 25 child component(Expansion).
const ExpansionView = ({ expansion }: {[key: string]: boolean} = {}): ReactElement => {
const validExpansion: StrArr ...
J Kim
Votes: 0
Answers: 1
Using components private functions using Enzyme in Jest
I'm looking at the answers here: How to unit test a method of react component?
I'm trying to use a components private function in one of my jest tests but when I do the following:
const nPanel = shall...
discodowney
Votes: 0
Answers: 0