Jest · Function
afterEach
afterEach runs cleanup after every test in its scope. It can wait for asynchronous cleanup and accepts an optional timeout in milliseconds.
Last updated
Syntax
afterEach(fn, timeout)In-depth API docs are only for subscribers: parameters, examples, common mistakes and interview practice.
SubscribeRelated
afterAllbeforeEachbeforeAlldescribe