Declares an afterAll hook that is executed once per worker after all tests.
Details
When called in the scope of a test file, runs after all tests in the file. When called inside a
test.describe(title, callback) group, runs after all
tests in the group. If multiple afterAll hooks are added, they will run in the order of their registration.
Note that worker process is restarted on test failures, and afterAll hook runs again in the new worker. Learn
more about workers and failures.
Usage
test.afterAll(async()=>{ console.log('Done with tests'); // ... });
Declares an
afterAll
hook that is executed once per worker after all tests.Details
When called in the scope of a test file, runs after all tests in the file. When called inside a test.describe(title, callback) group, runs after all tests in the group. If multiple
afterAll
hooks are added, they will run in the order of their registration.Note that worker process is restarted on test failures, and
afterAll
hook runs again in the new worker. Learn more about workers and failures.Usage