Hooks executed when running the test suite.
const testRunnerHooks: TestRunnerHooks = { testsStarting: [ () => import('./hooks/before_tests') ], testsFinished: [ () => import('./hooks/after_tests') ]} Copy
const testRunnerHooks: TestRunnerHooks = { testsStarting: [ () => import('./hooks/before_tests') ], testsFinished: [ () => import('./hooks/after_tests') ]}
The hook is executed before we begin executing the tests. Use this hook to set up test databases or perform pre-test setup.
The TestRunner instance that will execute the tests
The hook is executed after the tests have been executed. Use this hook to clean up resources or generate test reports.
The TestRunner instance that executed the tests
Hooks executed when running the test suite.
Example