graphql-testgen
v0.0.15
Published
Based on your schema.
Readme
Graphql API-tests generator
Based on your schema.
🚧 Early development stage
Commands
graphql-testgen gen Arguments
| flags | arguments | alias | description |
|---|---|---|---|
| --config | path | -c | Path to config file an example is displayed at Configurationusage: -c __tests__/api/testgen.jsdefault: ./testgen.js |
| --schema | | -s | path to schema file or url path to schemausage: -s __tests__/api/schema.graphqldefault: http://localhost:3000/graphql |
| --output | | -o | path to outputusage: -o __tests__/generated/default: __tests__/generated/ |
| --mocks | -m | | path to mocks usage: -m __test__/mocksdefault: __tests__/api/mocks |
| --append | -a | - | append to existing files usage: -adefault: false |
Configuration
Configuration file testgen.js
module.exports = {
schemaPath: 'http://localhost:3000/graphql',
outputDir: '__tests__/generated/',
mockDir: '__tests__/api/mocks/',
depth: 4,
}