Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

graphql-mock

Package Overview
Dependencies
Maintainers
1
Versions
19
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

graphql-mock - npm Package Compare versions

Comparing version 0.0.3 to 0.1.0

4

package.json
{
"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 @@

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc