Skip to content

Commit a5db1a1

Browse files
author
Mateu Aguiló Bosch
committed
feat: rename entry point
BREAKING CHANGE: renamed entry point from apolloServerWithContext to simpleServerWithContext
1 parent efad049 commit a5db1a1

File tree

4 files changed

+7
-7
lines changed

4 files changed

+7
-7
lines changed

src/index.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
11
// @flow
22

3-
module.exports.apolloServerWithContext = require('./apolloServerWithContext');
3+
module.exports.simpleServerWithContext = require('./simpleServerWithContext');
44
module.exports.readRelativeFile = require('./helpers/readFileUtf8');

src/index.test.js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,9 @@
1-
const { apolloServerWithContext, readRelativeFile } = require('./');
1+
const { simpleServerWithContext, readRelativeFile } = require('./');
22

33
describe('the entry point', () => {
44
it('cat get all the props', () => {
55
expect.assertions(2);
6-
expect(apolloServerWithContext).toEqual(expect.any(Function));
6+
expect(simpleServerWithContext).toEqual(expect.any(Function));
77
expect(readRelativeFile).toEqual(expect.any(Function));
88
});
99
});
Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -2,15 +2,15 @@ const ase = require('apollo-server-express');
22

33
jest.spyOn(ase, 'ApolloServer').mockImplementation(() => 0);
44

5-
const apolloServerWithContext = require('./apolloServerWithContext');
5+
const simpleServerWithContext = require('./simpleServerWithContext');
66

7-
describe('apolloServerWithContext', () => {
7+
describe('simpleServerWithContext', () => {
88
afterEach(() => {
99
ase.ApolloServer.mockReset();
1010
});
1111
it('can instantiate the ApolloServer', async () => {
1212
expect.assertions(5);
13-
const apolloServer = await apolloServerWithContext(
13+
const apolloServer = await simpleServerWithContext(
1414
{ foo: 'bar' },
1515
[Promise.resolve('{}'), Promise.resolve('Pi')],
1616
{ the: () => 'resolver' }
@@ -24,7 +24,7 @@ describe('apolloServerWithContext', () => {
2424
});
2525
it('can instantiate the ApolloServer with defaults', async () => {
2626
expect.assertions(5);
27-
const apolloServer = await apolloServerWithContext({ foo: 'bar' });
27+
const apolloServer = await simpleServerWithContext({ foo: 'bar' });
2828
const apolloArgs = ase.ApolloServer.mock.calls[0][0];
2929
expect(apolloServer).toBeInstanceOf(ase.ApolloServer);
3030
expect(apolloArgs.context).toEqual({ foo: 'bar' });

0 commit comments

Comments
 (0)