We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
beforeEach
afterEach
Currently, suite.before and suite.after are tied to the suite's lifecycle. This would be added to run before/after each test block within the suite.
suite.before
suite.after
test.before(() => { console.log('SETUP'); }); test.after(() => { console.log('CLEANUP'); }); test.beforeEach(() => { console.log('>> BEFORE'); }); test.afterEach(() => { console.log('>> AFTER'); }); // --- test('foo', () => { console.log('>>>> TEST: FOO'); }); test('bar', () => { console.log('>>>> TEST: BAR'); }); test.run(); // SETUP // >> BEFORE // >>>> TEST: FOO // >> AFTER // >> BEFORE // >>>> TEST: BAR // >> AFTER // CLEANUP
The text was updated successfully, but these errors were encountered:
uvu/spy
What about before.each() and after.each()?
before.each()
after.each()
The existing before() and after() hooks remain the same, but this way it nests the each modifier onto each hook type.
before()
after()
each
//cc @hyanmandian
Sorry, something went wrong.
Awesome idea @lukeed , I agree with you, in that case, a chainable approach is better.
lukeed
Successfully merging a pull request may close this issue.
Currently,
suite.before
andsuite.after
are tied to the suite's lifecycle.This would be added to run before/after each test block within the suite.
The text was updated successfully, but these errors were encountered: