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.
Loading...
Related Quiz
- To override ESLint rules for specific files or directories, you can create a .eslintignore or ______ file with the patterns of the files or directories to be excluded.
- When creating a multidimensional array in JavaScript, each element of the main array is ______.
- How does normalizing database tables impact the Read and Update operations in CRUD?
- What type of files are generally served as static files in Express.js?
- In the fs module, how can you create a new file?