Skip to content

Instantly share code, notes, and snippets.

@lmiller1990
Created September 28, 2018 04:00
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save lmiller1990/55a98acd5ac0f9e391d732e3ea70eb31 to your computer and use it in GitHub Desktop.
Save lmiller1990/55a98acd5ac0f9e391d732e3ea70eb31 to your computer and use it in GitHub Desktop.
import axios from 'axios'
Cypress.Commands.add('cleanDatabase', (opts = { seed: true }) => {
return axios({
method: 'POST',
url: 'http://localhost:3000/test/clean_database',
data: { should_seed: opts.seed }
})
})
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment