@trackunit/react-core-contexts-test 0.0.1-alpha-afcc978985.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -0,0 +1,2 @@
1
+ import { ICurrentUserContext } from "@trackunit/react-core-contexts-api";
2
+ export declare const mockCurrentUserContext: (overrides?: Partial<ICurrentUserContext>) => ICurrentUserContext;
@@ -0,0 +1,2 @@
1
+ import { IEnvironmentContext } from "@trackunit/react-core-contexts-api";
2
+ export declare const mockEnvironmentContext: IEnvironmentContext;
@@ -0,0 +1,2 @@
1
+ import { IFeature, IUserSubscriptionContext, UserSubscriptionPackageType } from "@trackunit/react-core-contexts-api";
2
+ export declare const mockUserSubscriptionProviderValue: (features: IFeature[], packageType: UserSubscriptionPackageType) => IUserSubscriptionContext;
package/package.json ADDED
@@ -0,0 +1,20 @@
1
+ {
2
+ "name": "@trackunit/react-core-contexts-test",
3
+ "version": "0.0.1-alpha-afcc978985.0",
4
+ "repository": "https://github.com/Trackunit/manager",
5
+ "license": "SEE LICENSE IN LICENSE.txt",
6
+ "module": "./index.js",
7
+ "main": "./index.js",
8
+ "type": "module",
9
+ "types": "./index.d.ts",
10
+ "dependencies": {
11
+ "@apollo/client": "3.6.9",
12
+ "react": "17.0.2",
13
+ "@trackunit/react-core-contexts-api": "0.0.1-alpha-afcc978985.0",
14
+ "@trackunit/react-core-hooks": "0.0.1-alpha-afcc978985.0",
15
+ "@trackunit/tailwind-styled-components": "0.0.1-alpha-afcc978985.0",
16
+ "react-router-dom": "6.4.1",
17
+ "graphql": "^15.8.0"
18
+ },
19
+ "peerDependencies": {}
20
+ }
@@ -0,0 +1 @@
1
+ export declare const doNothing: () => any | void;
@@ -0,0 +1,18 @@
1
+ import { ApolloError } from "@apollo/client";
2
+ import { MockedResponse } from "@apollo/client/testing";
3
+ import { DocumentNode } from "graphql";
4
+ /**
5
+ *
6
+ * @param document Document that represents the specific GQL query / mutation schema.
7
+ * @param variables Variables that should be passed to the query / mutation.
8
+ * Note that an *exact* match between the mock and operation is necessary.
9
+ * @param data Data object to be returned.
10
+ * Note that *all* properties should be given a value, use `null` in place of `undefined`,
11
+ * otherwise nothing will be returned.
12
+ * @param error ApolloError object to be returned.
13
+ * @returns MockedResponse that can be passed to the mocked ApolloProvider.
14
+ * @see [Testing React components using MockedProvider and associated APIs](https://www.apollographql.com/docs/react/development-testing/testing/)
15
+ */
16
+ export declare const queryFor: <Result extends {
17
+ __typename?: unknown;
18
+ }, Variables>(document: DocumentNode, variables: Variables, data: Result | null, error?: ApolloError | Error) => MockedResponse;
@@ -0,0 +1 @@
1
+ export declare const flushPromises: (waitTimeInMS?: number) => Promise<unknown>;