Skip to content

Instantly share code, notes, and snippets.

@kermit-klein
Created July 30, 2020 21:34
Show Gist options
  • Save kermit-klein/2b3e78d4a6e24898d21d3d86cf43d7b8 to your computer and use it in GitHub Desktop.
Save kermit-klein/2b3e78d4a6e24898d21d3d86cf43d7b8 to your computer and use it in GitHub Desktop.
cypress_command
import axios from "axios";
Cypress.Commands.add("deleteAndSeedDatabase", async () => {
return await axios.post("http://localhost:3000/test/delete_database", {
seed: true,
});
});
Cypress.Commands.add("deleteDatabase", async () => {
return await axios.post("http://localhost:3000/test/delete_database", {
seed: false,
});
});
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment