Testing asynchronous code
- How to get Timer Mocks and Promises to play nice
- How to test
Promise
-based delay function - Why doesn't
setImmediate
time out when using fake timers - How to test a debounced function
- Test resolve and reject callbacks of a
Promise
Mocking dependencies
- Mock a function in
Jest
- Mock an API module dependency
- Mock a
default
export - Mock an inner function in
Jest
- Mock a Node.js module in TypeScript using
Jest
- Mock
delay
fromRxJs
General testing
- How to interactively debug
Jest
tests in VSCode - Test recursive calls
- How does
Jest
allow mutation of modules - Testing code using
async / await
withMocha
- Using
Jest
property matchers on arrays of objects - Spy on bound class method of a
React
component UnhandledPromiseRejectionWarning
during test- Does
Jest
have a--require
option likeMocha
javascript
silver - 1,549thjavascript
bronze - 6,696thtypescript
bronze - 216thnode.js
bronze - 769threactjs
bronze - 312thjestjs
gold - 2ndjestjs
silver - 2ndjestjs
bronze - 2ndunit-testing
bronze - 196thenzyme
bronze - 2ndtesting
bronze - 39th