Created
March 20, 2019 15:35
-
-
Save cybrox/6c800ca75b3caa590d5894cf330d611f to your computer and use it in GitHub Desktop.
phx-ete6.js
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
before(() => { | |
// Before we run any tests, we reset our database. | |
// We also check back in any open database connection. If you save a | |
// test file, cypress will re-run the tests, not finishing the ones it | |
// is currently running, so we might end up with a checked-out connection | |
// lying around and blocking our database reset. | |
cy.checkindb() | |
cy.resetdb() | |
}) | |
beforeEach(() => { | |
// Before each test, we check out a database connection | |
cy.checkoutdb() | |
}) | |
afterEach(() => { | |
// After each test, we check the database connection back in | |
cy.checkindb() | |
}) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment