Loads content of a .graphql
file as plain string during execution of npm test
.
npm install --save-dev mocha-graphql-register
Add --compilers graphql:mocha-graphql-register
to your mocha.opts
or
pass it as param to Mocha
binary.
Take a look at ./test
directory.