Implement chainable always method.
From @jamestalmage's comment below:
What if it's always, and chainable:
test.always - even if a beforeEach fails.
test.afterEach.always - even if a test fails.
test.after.always - the OPs request.
Not sure the first one makes sense.
Original message
Near as I can figure, the .after() hook is only being ran if the tests have passed. I have a test file something like this (simplified/pseudo for clarity)
// ... imports
test('create a file', ...) // passes
test('do something else', ...) // fails
// ... other tests
test.after('clean up created files', ...) // never runs
Implement chainable
alwaysmethod.From @jamestalmage's comment below:
Original message
Near as I can figure, the
.after()hook is only being ran if the tests have passed. I have a test file something like this (simplified/pseudo for clarity)