Last active
November 22, 2018 13:43
-
-
Save barsumek/50cf9523c3ebfca01d3450f1daf39a1b to your computer and use it in GitHub Desktop.
Detox your GraphQL: Mock the Pokemon's level
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
// Test non-max Pokemon level | |
{ | |
const defaultPokemon = { | |
Pokemon: () => ({ | |
level: 10 | |
}) | |
}; | |
//... | |
await startGraphQLServer({ ...defaultPokemon }); | |
} | |
// Test max Pokemon level | |
{ | |
const maxLvlPokemon = { | |
Pokemon: () => ({ | |
level: 30 | |
}) | |
}; | |
//... | |
await startGraphQLServer({ ...maxLvlPokemon }); | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment