Skip to content

Commit 0768a16

Browse files
committed
Fixed lint errors, README updates
1 parent 79b6982 commit 0768a16

File tree

2 files changed

+11
-11
lines changed

2 files changed

+11
-11
lines changed

README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@ with [apollo-client](https://www.apollographql.com/client).
88
Install both the [slicknode-client](https://github.com/slicknode/slicknode-client) and the
99
[slicknode-apollo-link](https://github.com/slicknode/slicknode-apollo-link) npm package:
1010

11-
yarn add slicknode-apollo-link
11+
yarn add slicknode-client slicknode-apollo-link
1212

1313
## Usage
1414

src/__tests__/index-test.ts

Lines changed: 10 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,10 @@
1+
import { InMemoryCache } from 'apollo-cache-inmemory';
2+
import { ApolloClient } from 'apollo-client';
13
import {expect} from 'chai';
4+
import { parse } from 'graphql';
5+
import sinon from 'sinon';
26
import Client from 'slicknode-client';
37
import SlicknodeLink from '../index';
4-
import sinon from 'sinon';
5-
import { ApolloClient } from 'apollo-client';
6-
import { InMemoryCache } from 'apollo-cache-inmemory';
7-
import { parse } from 'graphql';
88

99
describe('SlicknodeLink', () => {
1010
it('fails for missing configuration options', () => {
@@ -38,14 +38,14 @@ describe('SlicknodeLink', () => {
3838
value: 'test',
3939
},
4040
};
41-
sinon.stub(client, "fetch").resolves(payload);
41+
sinon.stub(client, 'fetch').resolves(payload);
4242
const apolloClient = new ApolloClient({
4343
link,
44-
cache: new InMemoryCache()
44+
cache: new InMemoryCache(),
4545
});
4646

4747
const result = await apolloClient.query({
48-
query: parse('{value}')
48+
query: parse('{value}'),
4949
});
5050

5151
expect(result.data).to.deep.equal(payload.data);
@@ -60,15 +60,15 @@ describe('SlicknodeLink', () => {
6060
});
6161

6262
const errorMessage = 'Error fetching data';
63-
sinon.stub(client, "fetch").throws(errorMessage);
63+
sinon.stub(client, 'fetch').throws(errorMessage);
6464
const apolloClient = new ApolloClient({
6565
link,
66-
cache: new InMemoryCache()
66+
cache: new InMemoryCache(),
6767
});
6868

6969
try {
7070
const result = await apolloClient.query({
71-
query: parse('{value}')
71+
query: parse('{value}'),
7272
});
7373
} catch (e) {
7474
expect(e.networkError.name).to.deep.equal(errorMessage);

0 commit comments

Comments
 (0)