Feb
16
comment Is there a faster way to reset a mock when testing with Jest?
I don't understand how you can skip telling Jest to not mock React. Seems like everything would fail since all the React functions would be mocks. There's no way for you to know this based on my example, but in my real use case mockClear needs to be above the Widget render because I'm calling the store in the getInitialState call. Which means the render also has to be below the store mocking. Clearing the mock in the beforeEach block works, but I was really looking for a way to reset the entire object. But maybe my I should reorganize my tests to be tighter so I only need to clear a few funcs.
Feb
14
awarded Tumbleweed
Feb
7
awarded Yearling
Feb
7
asked Is there a faster way to reset a mock when testing with Jest?
Jan
11
awarded Popular Question
Sep
26
awarded Nice Question
May
21
asked Is there a consistent way to access sites, libraries, and folders using REST?
May
8
awarded Notable Question
May
1
awarded Notable Question
Mar
24
comment Javascript foreach loop on associative array object
Instead of using hasOwnProperty it should be possible in all modern web browsers to iterate over the keys of an object using: Object.keys(arr_jq_TabContents).forEach( function(key) { ... } );
Mar
16
awarded Nice Question
Mar
9
awarded Yearling
Feb
19
awarded Caucus
Feb
5
awarded Critic
Jan
25
awarded Teacher
Jan
21
awarded Famous Question
Jan
9
answered Stopping the "Will I need this for the test" question
Dec
25
awarded Favorite Question
Dec
9
awarded Famous Question
Sep
19
awarded Popular Question
1 2 3 4 5