Created
March 16, 2020 19:36
-
-
Save kevinold/a4e7626e10c3441a2e5eb88a3deac564 to your computer and use it in GitHub Desktop.
flexRoute plugin idea
This file contains 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
const internalFlexRoute = curry((httpVerb: string, route: string) => { | |
return cy.route(httpVerb, route); | |
}); | |
const flexRoute = curry((httpVerb: string, route: string, response: object) => { | |
const route = internalFlexroute(httpVerb, route); | |
return route(response); | |
}); | |
beforeEach(() => { | |
flexRoute("POST", "/transactions", {}); | |
//flexRoute({ abc: 123 }); | |
}); | |
flexRoute({ abc: 123 }); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment