In Jest, to isolate a module from its dependencies for more focused unit testing, you would use ______.

  • mock
  • stub
  • spy
  • inject
In Jest, you can use the mock function to isolate a module from its dependencies. This allows you to replace the real dependencies with mock implementations for focused unit testing.
Add your answer
Loading...

Leave a comment

Your email address will not be published. Required fields are marked *