Skip to content

Commit

Permalink
Added testing/core entry point
Browse files Browse the repository at this point in the history
  • Loading branch information
Wassim committed Aug 22, 2021
1 parent d470c96 commit e175d4b
Show file tree
Hide file tree
Showing 6 changed files with 19 additions and 2 deletions.
1 change: 1 addition & 0 deletions config/entryPoints.js
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,7 @@ const entryPoints = [
{ dirs: ['react', 'ssr'] },
{ dirs: ['utilities'] },
{ dirs: ['testing'], extensions: [".js", ".jsx"] },
{ dirs: ['testing', 'core'] },
];

const lookupTrie = Object.create(null);
Expand Down
13 changes: 13 additions & 0 deletions src/__tests__/__snapshots__/exports.ts.snap
Original file line number Diff line number Diff line change
Expand Up @@ -297,6 +297,19 @@ Array [
]
`;

exports[`exports of public entry points @apollo/client/testing/core 1`] = `
Array [
"MockLink",
"MockSubscriptionLink",
"createMockClient",
"itAsync",
"mockObservableLink",
"mockSingleLink",
"stripSymbols",
"subscribeAndCount",
]
`;

exports[`exports of public entry points @apollo/client/utilities 1`] = `
Array [
"Concast",
Expand Down
2 changes: 2 additions & 0 deletions src/__tests__/exports.ts
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,7 @@ import * as reactHooks from "../react/hooks";
import * as reactParser from "../react/parser";
import * as reactSSR from "../react/ssr";
import * as testing from "../testing";
import * as testingCore from "../testing/core";
import * as utilities from "../utilities";

const entryPoints = require("../../config/entryPoints.js");
Expand Down Expand Up @@ -60,6 +61,7 @@ describe('exports of public entry points', () => {
check("@apollo/client/react/parser", reactParser);
check("@apollo/client/react/ssr", reactSSR);
check("@apollo/client/testing", testing);
check("@apollo/client/testing/core", testingCore);
check("@apollo/client/utilities", utilities);

it("completeness", () => {
Expand Down
1 change: 1 addition & 0 deletions src/testing/core/index.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
export * from '../../utilities/testing';
3 changes: 2 additions & 1 deletion src/testing/index.ts
Original file line number Diff line number Diff line change
@@ -1 +1,2 @@
export * from '../utilities/testing';
export * from './core';
export { MockedProvider, MockedProviderProps } from '../utilities/testing/mocking/MockedProvider';
1 change: 0 additions & 1 deletion src/utilities/testing/index.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@
export { MockedProvider, MockedProviderProps } from './mocking/MockedProvider';
export { MockLink, mockSingleLink, MockedResponse } from './mocking/mockLink';
export {
MockSubscriptionLink,
Expand Down

0 comments on commit e175d4b

Please sign in to comment.