Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 
avatar of Brian Adams

Brian Adams

Brian Adams has asked 4 questions and find answers to 195 problems.

Stats

6.7k
EtPoint
2.5k
Vote count
4
questions
195
answers

About

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 from RxJs

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 with Mocha
  • 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 like Mocha

  • javascript silver - 1,549th
  • javascript bronze - 6,696th
  • typescript bronze - 216th
  • node.js bronze - 769th
  • reactjs bronze - 312th
  • jestjs gold - 2nd
  • jestjs silver - 2nd
  • jestjs bronze - 2nd
  • unit-testing bronze - 196th
  • enzyme bronze - 2nd
  • testing bronze - 39th