function
test.afterAll
fn: () => void | Promise<unknown> | (done: (err?: unknown) => void) => void,
options?: HookOptions
): void;
Runs a function, once, after all the tests.
Use this for cleanup, like closing a socket or deleting temporary files.
@param fn
the function to run
let database;
afterAll(async () => {
if (database) {
await database.close();
}
});