graphql-mock
Advanced tools
Comparing version 0.0.3 to 0.1.0
{ | ||
"name": "graphql-mock", | ||
"version": "0.0.3", | ||
"version": "0.1.0", | ||
"description": "GraphQL endpoint mockery library for testing", | ||
@@ -26,3 +26,3 @@ "files": [ | ||
"type": "git", | ||
"url": "git+ssh://git@github.com/MadRabbit/its-alive.git" | ||
"url": "git+ssh://git@github.com/MadRabbit/graphql-mock.git" | ||
}, | ||
@@ -29,0 +29,0 @@ "author": "Nikolay Nemshilov", |
@@ -64,3 +64,3 @@ # GraphQL Client Side Mocking | ||
] | ||
}) | ||
}); | ||
@@ -78,2 +78,16 @@ const wrapper = mount( | ||
## Testing Error States | ||
you can test failure states by using the `expect` + `fail` combo. here are some examples | ||
```js | ||
graqhqlMock.expect(query).fail('everything is terrible'); | ||
graqhqlMock.expect(query).fail([ | ||
{ mesage: 'everything is terrible' }, | ||
// ... | ||
]); | ||
graqhqlMock.expect(query).fail(new ApolloError({ .... })); | ||
``` | ||
## API & Stuff | ||
@@ -80,0 +94,0 @@ |
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
Major refactor
Supply chain riskPackage has recently undergone a major refactor. It may be unstable or indicate significant internal changes. Use caution when updating to versions that include significant changes.
Found 1 instance in 1 package
10450
122
0