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
I have a test that looks like the following (Pseudocode):
const db = connectToDatabase(); t.teardown(() => db.drop()); // drop-database const connection = db.connect(); t.teardown(() => connection.close()); // close-connection
If I run the test I get an error, because I can't drop the database with open connections.
This is because tap runs the teardown functions in the order in which there are defined:
drop-database
close-connection
I would expect that they are run in the reverse order:
This way all connections would be closed before the database is dropped. This would also match the behavior of other test runners:
beforeAll(() => console.log('Before each 1')) afterAll(() => console.log('After all 1')) beforeAll(() => console.log('Before each 2')) afterAll(() => console.log('After all 2')) it('should test', () => console.log('Test'))
Before each 1 Before each 2 Test After all 2 After all 1
The text was updated successfully, but these errors were encountered:
8a98c09
Successfully merging a pull request may close this issue.
I have a test that looks like the following (Pseudocode):
If I run the test I get an error, because I can't drop the database with open connections.
This is because tap runs the teardown functions in the order in which there are defined:
drop-database
close-connection
I would expect that they are run in the reverse order:
close-connection
drop-database
This way all connections would be closed before the database is dropped. This would also match the behavior of other test runners:
The text was updated successfully, but these errors were encountered: