To perform setup activities before every test case in a suite in Mocha, you can use the ______ hook.

  • before
  • beforeEach
  • setup
  • suiteSetup
In Mocha, the beforeEach hook is used to perform setup activities before every test case within a suite. It runs before each test case. The other options (before, setup, and suiteSetup) represent different hook names or are not used for this specific purpose in Mocha.
Add your answer
Loading...

Leave a comment

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