@apollo/client 3.8.3 → 3.9.0-alpha.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.
- package/README.md +8 -6
- package/apollo-client.cjs +12 -7
- package/apollo-client.cjs.map +1 -1
- package/apollo-client.min.cjs +1 -1
- package/config/jest/setup.js +10 -0
- package/config/jest/setup.js.map +1 -1
- package/core/QueryInfo.d.ts +1 -1
- package/core/QueryInfo.d.ts.map +1 -1
- package/core/QueryInfo.js +4 -4
- package/core/QueryInfo.js.map +1 -1
- package/core/QueryManager.d.ts +1 -1
- package/core/QueryManager.d.ts.map +1 -1
- package/core/QueryManager.js +1 -1
- package/core/QueryManager.js.map +1 -1
- package/core/core.cjs +6 -6
- package/core/core.cjs.map +1 -1
- package/core/core.cjs.native.js +6 -6
- package/dev/dev.cjs +7 -2
- package/dev/dev.cjs.map +1 -1
- package/dev/dev.cjs.native.js +7 -2
- package/package.json +30 -23
- package/testing/core/core.cjs +19 -2
- package/testing/core/core.cjs.map +1 -1
- package/testing/core/core.cjs.native.js +19 -2
- package/testing/core/mocking/mockLink.d.ts +5 -2
- package/testing/core/mocking/mockLink.d.ts.map +1 -1
- package/testing/core/mocking/mockLink.js +19 -2
- package/testing/core/mocking/mockLink.js.map +1 -1
- package/testing/core/withConsoleSpy.d.ts.map +1 -1
- package/testing/core/withConsoleSpy.js.map +1 -1
- package/testing/internal/disposables/index.d.ts +3 -0
- package/testing/internal/disposables/index.d.ts.map +1 -0
- package/testing/internal/disposables/index.js +3 -0
- package/testing/internal/disposables/index.js.map +1 -0
- package/testing/internal/disposables/spyOnConsole.d.ts +10 -0
- package/testing/internal/disposables/spyOnConsole.d.ts.map +1 -0
- package/testing/internal/disposables/spyOnConsole.js +33 -0
- package/testing/internal/disposables/spyOnConsole.js.map +1 -0
- package/testing/internal/disposables/withCleanup.d.ts +3 -0
- package/testing/internal/disposables/withCleanup.d.ts.map +1 -0
- package/testing/internal/disposables/withCleanup.js +11 -0
- package/testing/internal/disposables/withCleanup.js.map +1 -0
- package/testing/internal/index.d.ts +3 -0
- package/testing/internal/index.d.ts.map +1 -0
- package/testing/internal/index.js +3 -0
- package/testing/internal/index.js.map +1 -0
- package/testing/internal/profile/Render.d.ts +140 -0
- package/testing/internal/profile/Render.d.ts.map +1 -0
- package/testing/internal/profile/Render.js +132 -0
- package/testing/internal/profile/Render.js.map +1 -0
- package/testing/internal/profile/index.d.ts +4 -0
- package/testing/internal/profile/index.d.ts.map +1 -0
- package/testing/internal/profile/index.js +2 -0
- package/testing/internal/profile/index.js.map +1 -0
- package/testing/internal/profile/profile.d.ts +55 -0
- package/testing/internal/profile/profile.d.ts.map +1 -0
- package/testing/internal/profile/profile.js +222 -0
- package/testing/internal/profile/profile.js.map +1 -0
- package/testing/internal/profile/traces.d.ts +3 -0
- package/testing/internal/profile/traces.d.ts.map +1 -0
- package/testing/internal/profile/traces.js +26 -0
- package/testing/internal/profile/traces.js.map +1 -0
- package/testing/matchers/ProfiledComponent.d.ts +8 -0
- package/testing/matchers/ProfiledComponent.d.ts.map +1 -0
- package/testing/matchers/ProfiledComponent.js +107 -0
- package/testing/matchers/ProfiledComponent.js.map +1 -0
- package/testing/matchers/index.js +3 -0
- package/testing/matchers/index.js.map +1 -1
- package/utilities/globals/globals.cjs +7 -2
- package/utilities/globals/globals.cjs.map +1 -1
- package/utilities/globals/globals.cjs.native.js +7 -2
- package/utilities/globals/invariantWrappers.d.ts.map +1 -1
- package/utilities/globals/invariantWrappers.js +6 -1
- package/utilities/globals/invariantWrappers.js.map +1 -1
- package/version.js +1 -1
|
@@ -58,6 +58,9 @@ var MockLink = (function (_super) {
|
|
|
58
58
|
if (equality.equal(requestVariables, mockedResponseVars)) {
|
|
59
59
|
return true;
|
|
60
60
|
}
|
|
61
|
+
if (res.variableMatcher && res.variableMatcher(operation.variables)) {
|
|
62
|
+
return true;
|
|
63
|
+
}
|
|
61
64
|
unmatchedVars.push(mockedResponseVars);
|
|
62
65
|
return false;
|
|
63
66
|
})
|
|
@@ -78,7 +81,7 @@ var MockLink = (function (_super) {
|
|
|
78
81
|
mockedResponses.splice(responseIndex, 1);
|
|
79
82
|
var newData = response.newData;
|
|
80
83
|
if (newData) {
|
|
81
|
-
response.result = newData();
|
|
84
|
+
response.result = newData(operation.variables);
|
|
82
85
|
mockedResponses.push(response);
|
|
83
86
|
}
|
|
84
87
|
if (!response.result && !response.error) {
|
|
@@ -104,7 +107,7 @@ var MockLink = (function (_super) {
|
|
|
104
107
|
else {
|
|
105
108
|
if (response.result) {
|
|
106
109
|
observer.next(typeof response.result === "function"
|
|
107
|
-
? response.result()
|
|
110
|
+
? response.result(operation.variables)
|
|
108
111
|
: response.result);
|
|
109
112
|
}
|
|
110
113
|
observer.complete();
|
|
@@ -125,8 +128,22 @@ var MockLink = (function (_super) {
|
|
|
125
128
|
if (query) {
|
|
126
129
|
newMockedResponse.request.query = query;
|
|
127
130
|
}
|
|
131
|
+
this.normalizeVariableMatching(newMockedResponse);
|
|
128
132
|
return newMockedResponse;
|
|
129
133
|
};
|
|
134
|
+
MockLink.prototype.normalizeVariableMatching = function (mockedResponse) {
|
|
135
|
+
var variables = mockedResponse.request.variables;
|
|
136
|
+
if (mockedResponse.variableMatcher && variables) {
|
|
137
|
+
throw new Error("Mocked response should contain either variableMatcher or request.variables");
|
|
138
|
+
}
|
|
139
|
+
if (!mockedResponse.variableMatcher) {
|
|
140
|
+
mockedResponse.variableMatcher = function (vars) {
|
|
141
|
+
var requestVariables = vars || {};
|
|
142
|
+
var mockedResponseVariables = variables || {};
|
|
143
|
+
return equality.equal(requestVariables, mockedResponseVariables);
|
|
144
|
+
};
|
|
145
|
+
}
|
|
146
|
+
};
|
|
130
147
|
return MockLink;
|
|
131
148
|
}(core.ApolloLink));
|
|
132
149
|
function mockSingleLink() {
|
|
@@ -1,12 +1,14 @@
|
|
|
1
1
|
import type { Operation, GraphQLRequest, FetchResult } from "../../../link/core/index.js";
|
|
2
2
|
import { ApolloLink } from "../../../link/core/index.js";
|
|
3
3
|
import { Observable } from "../../../utilities/index.js";
|
|
4
|
-
export type ResultFunction<T
|
|
4
|
+
export type ResultFunction<T, V = Record<string, any>> = (variables: V) => T;
|
|
5
|
+
export type VariableMatcher<V = Record<string, any>> = (variables: V) => boolean;
|
|
5
6
|
export interface MockedResponse<TData = Record<string, any>, TVariables = Record<string, any>> {
|
|
6
7
|
request: GraphQLRequest<TVariables>;
|
|
7
|
-
result?: FetchResult<TData> | ResultFunction<FetchResult<TData
|
|
8
|
+
result?: FetchResult<TData> | ResultFunction<FetchResult<TData>, TVariables>;
|
|
8
9
|
error?: Error;
|
|
9
10
|
delay?: number;
|
|
11
|
+
variableMatcher?: VariableMatcher<TVariables>;
|
|
10
12
|
newData?: ResultFunction<FetchResult>;
|
|
11
13
|
}
|
|
12
14
|
export interface MockLinkOptions {
|
|
@@ -21,6 +23,7 @@ export declare class MockLink extends ApolloLink {
|
|
|
21
23
|
addMockedResponse(mockedResponse: MockedResponse): void;
|
|
22
24
|
request(operation: Operation): Observable<FetchResult> | null;
|
|
23
25
|
private normalizeMockedResponse;
|
|
26
|
+
private normalizeVariableMatching;
|
|
24
27
|
}
|
|
25
28
|
export interface MockApolloLink extends ApolloLink {
|
|
26
29
|
operation?: Operation;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"mockLink.d.ts","sourceRoot":"","sources":["../../../../src/testing/core/mocking/mockLink.ts"],"names":[],"mappings":"AAIA,OAAO,KAAK,EACV,SAAS,EACT,cAAc,EACd,WAAW,EACZ,MAAM,6BAA6B,CAAC;AACrC,OAAO,EAAE,UAAU,EAAE,MAAM,6BAA6B,CAAC;AAEzD,OAAO,EACL,UAAU,EAOX,MAAM,6BAA6B,CAAC;AAErC,MAAM,MAAM,cAAc,CAAC,CAAC,IAAI,MAAM,CAAC,CAAC;
|
|
1
|
+
{"version":3,"file":"mockLink.d.ts","sourceRoot":"","sources":["../../../../src/testing/core/mocking/mockLink.ts"],"names":[],"m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C3B,OAAO,GAAE,eAAqC;IAazC,iBAAiB,CAAC,cAAc,EAAE,cAAc;IAehD,OAAO,CAAC,SAAS,EAAE,SAAS,GAAG,UAAU,CAAC,WAAW,CAAC,GAAG,IAAI;IAwGpE,OAAO,CAAC,uBAAuB;IAiB/B,OAAO,CAAC,yBAAyB;CAgBlC;AAED,MAAM,WAAW,cAAe,SAAQ,UAAU;IAChD,SAAS,CAAC,EAAE,SAAS,CAAC;CACvB;AAKD,wBAAgB,cAAc,CAAC,GAAG,eAAe,EAAE,KAAK,CAAC,GAAG,CAAC,GAAG,cAAc,CAY7E"}
|
|
@@ -51,6 +51,9 @@ var MockLink = (function (_super) {
|
|
|
51
51
|
if (equal(requestVariables, mockedResponseVars)) {
|
|
52
52
|
return true;
|
|
53
53
|
}
|
|
54
|
+
if (res.variableMatcher && res.variableMatcher(operation.variables)) {
|
|
55
|
+
return true;
|
|
56
|
+
}
|
|
54
57
|
unmatchedVars.push(mockedResponseVars);
|
|
55
58
|
return false;
|
|
56
59
|
})
|
|
@@ -71,7 +74,7 @@ var MockLink = (function (_super) {
|
|
|
71
74
|
mockedResponses.splice(responseIndex, 1);
|
|
72
75
|
var newData = response.newData;
|
|
73
76
|
if (newData) {
|
|
74
|
-
response.result = newData();
|
|
77
|
+
response.result = newData(operation.variables);
|
|
75
78
|
mockedResponses.push(response);
|
|
76
79
|
}
|
|
77
80
|
if (!response.result && !response.error) {
|
|
@@ -97,7 +100,7 @@ var MockLink = (function (_super) {
|
|
|
97
100
|
else {
|
|
98
101
|
if (response.result) {
|
|
99
102
|
observer.next(typeof response.result === "function"
|
|
100
|
-
? response.result()
|
|
103
|
+
? response.result(operation.variables)
|
|
101
104
|
: response.result);
|
|
102
105
|
}
|
|
103
106
|
observer.complete();
|
|
@@ -118,8 +121,22 @@ var MockLink = (function (_super) {
|
|
|
118
121
|
if (query) {
|
|
119
122
|
newMockedResponse.request.query = query;
|
|
120
123
|
}
|
|
124
|
+
this.normalizeVariableMatching(newMockedResponse);
|
|
121
125
|
return newMockedResponse;
|
|
122
126
|
};
|
|
127
|
+
MockLink.prototype.normalizeVariableMatching = function (mockedResponse) {
|
|
128
|
+
var variables = mockedResponse.request.variables;
|
|
129
|
+
if (mockedResponse.variableMatcher && variables) {
|
|
130
|
+
throw new Error("Mocked response should contain either variableMatcher or request.variables");
|
|
131
|
+
}
|
|
132
|
+
if (!mockedResponse.variableMatcher) {
|
|
133
|
+
mockedResponse.variableMatcher = function (vars) {
|
|
134
|
+
var requestVariables = vars || {};
|
|
135
|
+
var mockedResponseVariables = variables || {};
|
|
136
|
+
return equal(requestVariables, mockedResponseVariables);
|
|
137
|
+
};
|
|
138
|
+
}
|
|
139
|
+
};
|
|
123
140
|
return MockLink;
|
|
124
141
|
}(ApolloLink));
|
|
125
142
|
export { MockLink };
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"mockLink.js","sourceRoot":"","sources":["../../../../src/testing/core/mocking/mockLink.ts"],"names":[],"mappings":";AAAA,OAAO,EAAE,SAAS,EAAE,MAAM,qCAAqC,CAAC;AAEhE,OAAO,EAAE,KAAK,EAAE,MAAM,eAAe,CAAC;AAOtC,OAAO,EAAE,UAAU,EAAE,MAAM,6BAA6B,CAAC;AAEzD,OAAO,EACL,UAAU,EACV,qBAAqB,EACrB,4BAA4B,EAC5B,qCAAqC,EACrC,SAAS,EACT,mBAAmB,EACnB,KAAK,GACN,MAAM,6BAA6B,CAAC;AAmBrC,SAAS,YAAY,CAAC,OAAuB,EAAE,WAAoB;IACjE,IAAM,WAAW,GACf,OAAO,CAAC,KAAK;QACb,KAAK,CAAC,WAAW,CAAC,CAAC,CAAC,qBAAqB,CAAC,OAAO,CAAC,KAAK,CAAC,CAAC,CAAC,CAAC,OAAO,CAAC,KAAK,CAAC,CAAC;IAC5E,IAAM,UAAU,GAAG,EAAE,KAAK,EAAE,WAAW,EAAE,CAAC;IAC1C,OAAO,IAAI,CAAC,SAAS,CAAC,UAAU,CAAC,CAAC;AACpC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nimport { equal } from \"@wry/equality\";\n\nimport type {\n Operation,\n GraphQLRequest,\n FetchResult,\n} from \"../../../link/core/index.js\";\nimport { ApolloLink } from \"../../../link/core/index.js\";\n\nimport {\n Observable,\n addTypenameToDocument,\n removeClientSetsFromDocument,\n removeConnectionDirectiveFromDocument,\n cloneDeep,\n stringifyForDisplay,\n print,\n} from \"../../../utilities/index.js\";\n\nexport type ResultFunction<T> = () => T;\n\nexport interface MockedResponse<\n TData = Record<string, any>,\n TVariables = Record<string, any>,\n> {\n request: GraphQLRequest<TVariables>;\n result?: FetchResult<TData> | ResultFunction<FetchResult<TData>>;\n error?: Error;\n delay?: number;\n newData?: ResultFunction<FetchResult>;\n}\n\nexport interface MockLinkOptions {\n showWarnings?: boolean;\n}\n\nfunction requestToKey(request: GraphQLRequest, addTypename: Boolean): string {\n const queryString =\n request.query &&\n print(addTypename ? addTypenameToDocument(request.query) : request.query);\n const requestKey = { query: queryString };\n return JSON.stringify(requestKey);\n}\n\nexport class MockLink extends ApolloLink {\n public operation: Operation;\n public addTypename: Boolean = true;\n public showWarnings: boolean = true;\n private mockedResponsesByKey: { [key: string]: MockedResponse[] } = {};\n\n constructor(\n mockedResponses: ReadonlyArray<MockedResponse>,\n addTypename: Boolean = true,\n options: MockLinkOptions = Object.create(null)\n ) {\n super();\n this.addTypename = addTypename;\n this.showWarnings = options.showWarnings ?? true;\n\n if (mockedResponses) {\n mockedResponses.forEach((mockedResponse) => {\n this.addMockedResponse(mockedResponse);\n });\n }\n }\n\n public addMockedResponse(mockedResponse: MockedResponse) {\n const normalizedMockedResponse =\n this.normalizeMockedResponse(mockedResponse);\n const key = requestToKey(\n normalizedMockedResponse.request,\n this.addTypename\n );\n let mockedResponses = this.mockedResponsesByKey[key];\n if (!mockedResponses) {\n mockedResponses = [];\n this.mockedResponsesByKey[key] = mockedResponses;\n }\n mockedResponses.push(normalizedMockedResponse);\n }\n\n public request(operation: Operation): Observable<FetchResult> | null {\n this.operation = operation;\n const key = requestToKey(operation, this.addTypename);\n const unmatchedVars: Array<Record<string, any>> = [];\n const requestVariables = operation.variables || {};\n const mockedResponses = this.mockedResponsesByKey[key];\n const responseIndex = mockedResponses\n ? mockedResponses.findIndex((res, index) => {\n const mockedResponseVars = res.request.variables || {};\n if (equal(requestVariables, mockedResponseVars)) {\n return true;\n }\n unmatchedVars.push(mockedResponseVars);\n return false;\n })\n : -1;\n\n const response =\n responseIndex >= 0 ? mockedResponses[responseIndex] : void 0;\n\n let configError: Error;\n\n if (!response) {\n configError = new Error(\n `No more mocked responses for the query: ${print(operation.query)}\nExpected variables: ${stringifyForDisplay(operation.variables)}\n${\n unmatchedVars.length > 0\n ? `\nFailed to match ${unmatchedVars.length} mock${\n unmatchedVars.length === 1 ? \"\" : \"s\"\n } for this query. The mocked response had the following variables:\n${unmatchedVars.map((d) => ` ${stringifyForDisplay(d)}`).join(\"\\n\")}\n`\n : \"\"\n}`\n );\n\n if (this.showWarnings) {\n console.warn(\n configError.message +\n \"\\nThis typically indicates a configuration error in your mocks \" +\n \"setup, usually due to a typo or mismatched variable.\"\n );\n }\n } else {\n mockedResponses.splice(responseIndex, 1);\n\n const { newData } = response;\n if (newData) {\n response.result = newData();\n mockedResponses.push(response);\n }\n\n if (!response.result && !response.error) {\n configError = new Error(\n `Mocked response should contain either result or error: ${key}`\n );\n }\n }\n\n return new Observable((observer) => {\n const timer = setTimeout(\n () => {\n if (configError) {\n try {\n // The onError function can return false to indicate that\n // configError need not be passed to observer.error. For\n // example, the default implementation of onError calls\n // observer.error(configError) and then returns false to\n // prevent this extra (harmless) observer.error call.\n if (this.onError(configError, observer) !== false) {\n throw configError;\n }\n } catch (error) {\n observer.error(error);\n }\n } else if (response) {\n if (response.error) {\n observer.error(response.error);\n } else {\n if (response.result) {\n observer.next(\n typeof response.result === \"function\"\n ? (response.result as ResultFunction<FetchResult>)()\n : response.result\n );\n }\n observer.complete();\n }\n }\n },\n (response && response.delay) || 0\n );\n\n return () => {\n clearTimeout(timer);\n };\n });\n }\n\n private normalizeMockedResponse(\n mockedResponse: MockedResponse\n ): MockedResponse {\n const newMockedResponse = cloneDeep(mockedResponse);\n const queryWithoutConnection = removeConnectionDirectiveFromDocument(\n newMockedResponse.request.query\n );\n invariant(queryWithoutConnection, \"query is required\");\n newMockedResponse.request.query = queryWithoutConnection!;\n const query = removeClientSetsFromDocument(newMockedResponse.request.query);\n if (query) {\n newMockedResponse.request.query = query;\n }\n return newMockedResponse;\n }\n}\n\nexport interface MockApolloLink extends ApolloLink {\n operation?: Operation;\n}\n\n// Pass in multiple mocked responses, so that you can test flows that end up\n// making multiple queries to the server.\n// NOTE: The last arg can optionally be an `addTypename` arg.\nexport function mockSingleLink(...mockedResponses: Array<any>): MockApolloLink {\n // To pull off the potential typename. If this isn't a boolean, we'll just\n // set it true later.\n let maybeTypename = mockedResponses[mockedResponses.length - 1];\n let mocks = mockedResponses.slice(0, mockedResponses.length - 1);\n\n if (typeof maybeTypename !== \"boolean\") {\n mocks = mockedResponses;\n maybeTypename = true;\n }\n\n return new MockLink(mocks, maybeTypename);\n}\n"]}
|
|
1
|
+
{"version":3,"file":"mockLink.js","sourceRoot":"","sources":["../../../../src/testing/core/mocking/mockLink.ts"],"names":[],"mappings":";AAAA,OAAO,EAAE,SAAS,EAAE,MAAM,qCAAqC,CAAC;AAEhE,OAAO,EAAE,KAAK,EAAE,MAAM,eAAe,CAAC;AAOtC,OAAO,EAAE,UAAU,EAAE,MAAM,6BAA6B,CAAC;AAEzD,OAAO,EACL,UAAU,EACV,qBAAqB,EACrB,4BAA4B,EAC5B,qCAAqC,EACrC,SAAS,EACT,mBAAmB,EACnB,KAAK,GACN,MAAM,6BAA6B,CAAC;AAwBrC,SAAS,YAAY,CAAC,OAAuB,EAAE,WAAoB;IACjE,IAAM,WAAW,GACf,OAAO,CAAC,KAAK;QACb,KAAK,CAAC,WAAW,CAAC,CAAC,CAAC,qBAAqB,CAAC,OAAO,CAAC,KAAK,CAAC,CAAC,CAAC,CAAC,OAAO,C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AC;SACH;QAED,IAAI,CAAC,cAAc,CAAC,eAAe,EAAE;YACnC,cAAc,CAAC,eAAe,GAAG,UAAC,IAAI;gBACpC,IAAM,gBAAgB,GAAG,IAAI,IAAI,EAAE,CAAC;gBACpC,IAAM,uBAAuB,GAAG,SAAS,IAAI,EAAE,CAAC;gBAChD,OAAO,KAAK,CAAC,gBAAgB,EAAE,uBAAuB,CAAC,CAAC;YAC1D,CAAC,CAAC;SACH;IACH,CAAC;IACH,eAAC;AAAD,CAAC,AA9KD,CAA8B,UAAU,GA8KvC;;AASD,MAAM,UAAU,cAAc;IAAC,yBAA8B;SAA9B,UAA8B,EAA9B,qBAA8B,EAA9B,IAA8B;QAA9B,oCAA8B;;IAG3D,IAAI,aAAa,GAAG,eAAe,CAAC,eAAe,CAAC,MAAM,GAAG,CAAC,CAAC,CAAC;IAChE,IAAI,KAAK,GAAG,eAAe,CAAC,KAAK,CAAC,CAAC,EAAE,eAAe,CAAC,MAAM,GAAG,CAAC,CAAC,CAAC;IAEjE,IAAI,OAAO,aAAa,KAAK,SAAS,EAAE;QACtC,KAAK,GAAG,eAAe,CAAC;QACxB,aAAa,GAAG,IAAI,CAAC;KACtB;IAED,OAAO,IAAI,QAAQ,CAAC,KAAK,EAAE,aAAa,CAAC,CAAC;AAC5C,CAAC","sourcesContent":["import { invariant } from \"../../../utilities/globals/index.js\";\n\nimport { equal } from \"@wry/equality\";\n\nimport type {\n Operation,\n GraphQLRequest,\n FetchResult,\n} from \"../../../link/core/index.js\";\nimport { ApolloLink } from \"../../../link/core/index.js\";\n\nimport {\n Observable,\n addTypenameToDocument,\n removeClientSetsFromDocument,\n removeConnectionDirectiveFromDocument,\n cloneDeep,\n stringifyForDisplay,\n print,\n} from \"../../../utilities/index.js\";\n\nexport type ResultFunction<T, V = Record<string, any>> = (variables: V) => T;\n\nexport type VariableMatcher<V = Record<string, any>> = (\n variables: V\n) => boolean;\n\nexport interface MockedResponse<\n TData = Record<string, any>,\n TVariables = Record<string, any>,\n> {\n request: GraphQLRequest<TVariables>;\n result?: FetchResult<TData> | ResultFunction<FetchResult<TData>, TVariables>;\n error?: Error;\n delay?: number;\n variableMatcher?: VariableMatcher<TVariables>;\n newData?: ResultFunction<FetchResult>;\n}\n\nexport interface MockLinkOptions {\n showWarnings?: boolean;\n}\n\nfunction requestToKey(request: GraphQLRequest, addTypename: Boolean): string {\n const queryString =\n request.query &&\n print(addTypename ? addTypenameToDocument(request.query) : request.query);\n const requestKey = { query: queryString };\n return JSON.stringify(requestKey);\n}\n\nexport class MockLink extends ApolloLink {\n public operation: Operation;\n public addTypename: Boolean = true;\n public showWarnings: boolean = true;\n private mockedResponsesByKey: { [key: string]: MockedResponse[] } = {};\n\n constructor(\n mockedResponses: ReadonlyArray<MockedResponse>,\n addTypename: Boolean = true,\n options: MockLinkOptions = Object.create(null)\n ) {\n super();\n this.addTypename = addTypename;\n this.showWarnings = options.showWarnings ?? true;\n\n if (mockedResponses) {\n mockedResponses.forEach((mockedResponse) => {\n this.addMockedResponse(mockedResponse);\n });\n }\n }\n\n public addMockedResponse(mockedResponse: MockedResponse) {\n const normalizedMockedResponse =\n this.normalizeMockedResponse(mockedResponse);\n const key = requestToKey(\n normalizedMockedResponse.request,\n this.addTypename\n );\n let mockedResponses = this.mockedResponsesByKey[key];\n if (!mockedResponses) {\n mockedResponses = [];\n this.mockedResponsesByKey[key] = mockedResponses;\n }\n mockedResponses.push(normalizedMockedResponse);\n }\n\n public request(operation: Operation): Observable<FetchResult> | null {\n this.operation = operation;\n const key = requestToKey(operation, this.addTypename);\n const unmatchedVars: Array<Record<string, any>> = [];\n const requestVariables = operation.variables || {};\n const mockedResponses = this.mockedResponsesByKey[key];\n const responseIndex = mockedResponses\n ? mockedResponses.findIndex((res, index) => {\n const mockedResponseVars = res.request.variables || {};\n if (equal(requestVariables, mockedResponseVars)) {\n return true;\n }\n if (res.variableMatcher && res.variableMatcher(operation.variables)) {\n return true;\n }\n unmatchedVars.push(mockedResponseVars);\n return false;\n })\n : -1;\n\n const response =\n responseIndex >= 0 ? mockedResponses[responseIndex] : void 0;\n\n let configError: Error;\n\n if (!response) {\n configError = new Error(\n `No more mocked responses for the query: ${print(operation.query)}\nExpected variables: ${stringifyForDisplay(operation.variables)}\n${\n unmatchedVars.length > 0\n ? `\nFailed to match ${unmatchedVars.length} mock${\n unmatchedVars.length === 1 ? \"\" : \"s\"\n } for this query. The mocked response had the following variables:\n${unmatchedVars.map((d) => ` ${stringifyForDisplay(d)}`).join(\"\\n\")}\n`\n : \"\"\n}`\n );\n\n if (this.showWarnings) {\n console.warn(\n configError.message +\n \"\\nThis typically indicates a configuration error in your mocks \" +\n \"setup, usually due to a typo or mismatched variable.\"\n );\n }\n } else {\n mockedResponses.splice(responseIndex, 1);\n\n const { newData } = response;\n if (newData) {\n response.result = newData(operation.variables);\n mockedResponses.push(response);\n }\n\n if (!response.result && !response.error) {\n configError = new Error(\n `Mocked response should contain either result or error: ${key}`\n );\n }\n }\n\n return new Observable((observer) => {\n const timer = setTimeout(\n () => {\n if (configError) {\n try {\n // The onError function can return false to indicate that\n // configError need not be passed to observer.error. For\n // example, the default implementation of onError calls\n // observer.error(configError) and then returns false to\n // prevent this extra (harmless) observer.error call.\n if (this.onError(configError, observer) !== false) {\n throw configError;\n }\n } catch (error) {\n observer.error(error);\n }\n } else if (response) {\n if (response.error) {\n observer.error(response.error);\n } else {\n if (response.result) {\n observer.next(\n typeof response.result === \"function\"\n ? response.result(operation.variables)\n : response.result\n );\n }\n observer.complete();\n }\n }\n },\n (response && response.delay) || 0\n );\n\n return () => {\n clearTimeout(timer);\n };\n });\n }\n\n private normalizeMockedResponse(\n mockedResponse: MockedResponse\n ): MockedResponse {\n const newMockedResponse = cloneDeep(mockedResponse);\n const queryWithoutConnection = removeConnectionDirectiveFromDocument(\n newMockedResponse.request.query\n );\n invariant(queryWithoutConnection, \"query is required\");\n newMockedResponse.request.query = queryWithoutConnection!;\n const query = removeClientSetsFromDocument(newMockedResponse.request.query);\n if (query) {\n newMockedResponse.request.query = query;\n }\n this.normalizeVariableMatching(newMockedResponse);\n return newMockedResponse;\n }\n\n private normalizeVariableMatching(mockedResponse: MockedResponse) {\n const variables = mockedResponse.request.variables;\n if (mockedResponse.variableMatcher && variables) {\n throw new Error(\n \"Mocked response should contain either variableMatcher or request.variables\"\n );\n }\n\n if (!mockedResponse.variableMatcher) {\n mockedResponse.variableMatcher = (vars) => {\n const requestVariables = vars || {};\n const mockedResponseVariables = variables || {};\n return equal(requestVariables, mockedResponseVariables);\n };\n }\n }\n}\n\nexport interface MockApolloLink extends ApolloLink {\n operation?: Operation;\n}\n\n// Pass in multiple mocked responses, so that you can test flows that end up\n// making multiple queries to the server.\n// NOTE: The last arg can optionally be an `addTypename` arg.\nexport function mockSingleLink(...mockedResponses: Array<any>): MockApolloLink {\n // To pull off the potential typename. If this isn't a boolean, we'll just\n // set it true later.\n let maybeTypename = mockedResponses[mockedResponses.length - 1];\n let mocks = mockedResponses.slice(0, mockedResponses.length - 1);\n\n if (typeof maybeTypename !== \"boolean\") {\n mocks = mockedResponses;\n maybeTypename = true;\n }\n\n return new MockLink(mocks, maybeTypename);\n}\n"]}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"withConsoleSpy.d.ts","sourceRoot":"","sources":["../../../src/testing/core/withConsoleSpy.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"withConsoleSpy.d.ts","sourceRoot":"","sources":["../../../src/testing/core/withConsoleSpy.ts"],"names":[],"mappings":"AAkBA,wBAAgB,YAAY,CAAC,KAAK,SAAS,GAAG,EAAE,EAAE,OAAO,EACvD,EAAE,EAAE,CAAC,GAAG,IAAI,EAAE,KAAK,KAAK,OAAO,EAC/B,GAAG,IAAI,EAAE,KAAK,WAIf;AAGD,wBAAgB,cAAc,CAAC,KAAK,SAAS,GAAG,EAAE,EAAE,OAAO,EACzD,EAAE,EAAE,CAAC,GAAG,IAAI,EAAE,KAAK,KAAK,OAAO,EAC/B,GAAG,IAAI,EAAE,KAAK,WAIf;AAGD,wBAAgB,UAAU,CAAC,KAAK,SAAS,GAAG,EAAE,EAAE,OAAO,EACrD,EAAE,EAAE,CAAC,GAAG,IAAI,EAAE,KAAK,KAAK,OAAO,EAC/B,GAAG,IAAI,EAAE,KAAK,WAIf"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"withConsoleSpy.js","sourceRoot":"","sources":["../../../src/testing/core/withConsoleSpy.ts"],"names":[],"mappings":"AAAA,SAAS,gBAAgB,CACvB,EAA2B,EAC3B,iBAA2C;IAE3C,OAAO;QAAA,iBAUN;QATC,IAAM,IAAI,GAAG,SAAS,CAAC;QACvB,IAAM,GAAG,GAAG,IAAI,CAAC,KAAK,CAAC,OAAO,EAAE,iBAAiB,CAAC,CAAC;QACnD,GAAG,CAAC,kBAAkB,CAAC,cAAO,CAAC,CAAC,CAAC;QACjC,OAAO,IAAI,OAAO,CAAC,UAAC,OAAO;YACzB,OAAO,CAAC,EAAE,aAAF,EAAE,uBAAF,EAAE,CAAE,KAAK,CAAC,KAAI,EAAE,IAAI,CAAC,CAAC,CAAC;QACjC,CAAC,CAAC,CAAC,OAAO,CAAC;YACT,MAAM,CAAC,GAAG,CAAC,CAAC,eAAe,EAAE,CAAC;YAC9B,GAAG,CAAC,SAAS,EAAE,CAAC;QAClB,CAAC,CAAC,CAAC;IACL,CAAC,CAAC;AACJ,CAAC;
|
|
1
|
+
{"version":3,"file":"withConsoleSpy.js","sourceRoot":"","sources":["../../../src/testing/core/withConsoleSpy.ts"],"names":[],"mappings":"AAAA,SAAS,gBAAgB,CACvB,EAA2B,EAC3B,iBAA2C;IAE3C,OAAO;QAAA,iBAUN;QATC,IAAM,IAAI,GAAG,SAAS,CAAC;QACvB,IAAM,GAAG,GAAG,IAAI,CAAC,KAAK,CAAC,OAAO,EAAE,iBAAiB,CAAC,CAAC;QACnD,GAAG,CAAC,kBAAkB,CAAC,cAAO,CAAC,CAAC,CAAC;QACjC,OAAO,IAAI,OAAO,CAAC,UAAC,OAAO;YACzB,OAAO,CAAC,EAAE,aAAF,EAAE,uBAAF,EAAE,CAAE,KAAK,CAAC,KAAI,EAAE,IAAI,CAAC,CAAC,CAAC;QACjC,CAAC,CAAC,CAAC,OAAO,CAAC;YACT,MAAM,CAAC,GAAG,CAAC,CAAC,eAAe,EAAE,CAAC;YAC9B,GAAG,CAAC,SAAS,EAAE,CAAC;QAClB,CAAC,CAAC,CAAC;IACL,CAAC,CAAC;AACJ,CAAC;AAGD,MAAM,UAAU,YAAY,CAC1B,EAA+B;IAC/B,cAAc;SAAd,UAAc,EAAd,qBAAc,EAAd,IAAc;QAAd,6BAAc;;IAEd,IAAI,CAAC,CAAC,CAAC,GAAG,gBAAgB,CAAC,IAAI,CAAC,CAAC,CAAC,EAAE,OAAO,CAAC,CAAC;IAC7C,OAAO,EAAE,eAAI,IAAI,EAAE;AACrB,CAAC;AAGD,MAAM,UAAU,cAAc,CAC5B,EAA+B;IAC/B,cAAc;SAAd,UAAc,EAAd,qBAAc,EAAd,IAAc;QAAd,6BAAc;;IAEd,IAAI,CAAC,CAAC,CAAC,GAAG,gBAAgB,CAAC,IAAI,CAAC,CAAC,CAAC,EAAE,MAAM,CAAC,CAAC;IAC5C,OAAO,EAAE,eAAI,IAAI,EAAE;AACrB,CAAC;AAGD,MAAM,UAAU,UAAU,CACxB,EAA+B;IAC/B,cAAc;SAAd,UAAc,EAAd,qBAAc,EAAd,IAAc;QAAd,6BAAc;;IAEd,IAAI,CAAC,CAAC,CAAC,GAAG,gBAAgB,CAAC,IAAI,CAAC,CAAC,CAAC,EAAE,KAAK,CAAC,CAAC;IAC3C,OAAO,EAAE,eAAI,IAAI,EAAE;AACrB,CAAC","sourcesContent":["function wrapTestFunction(\n fn: (...args: any[]) => any,\n consoleMethodName: \"log\" | \"warn\" | \"error\"\n) {\n return function () {\n const args = arguments;\n const spy = jest.spyOn(console, consoleMethodName);\n spy.mockImplementation(() => {});\n return new Promise((resolve) => {\n resolve(fn?.apply(this, args));\n }).finally(() => {\n expect(spy).toMatchSnapshot();\n spy.mockReset();\n });\n };\n}\n\n/** @deprecated This method will be removed in the next major version of Apollo Client */\nexport function withErrorSpy<TArgs extends any[], TResult>(\n it: (...args: TArgs) => TResult,\n ...args: TArgs\n) {\n args[1] = wrapTestFunction(args[1], \"error\");\n return it(...args);\n}\n\n/** @deprecated This method will be removed in the next major version of Apollo Client */\nexport function withWarningSpy<TArgs extends any[], TResult>(\n it: (...args: TArgs) => TResult,\n ...args: TArgs\n) {\n args[1] = wrapTestFunction(args[1], \"warn\");\n return it(...args);\n}\n\n/** @deprecated This method will be removed in the next major version of Apollo Client */\nexport function withLogSpy<TArgs extends any[], TResult>(\n it: (...args: TArgs) => TResult,\n ...args: TArgs\n) {\n args[1] = wrapTestFunction(args[1], \"log\");\n return it(...args);\n}\n"]}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../src/testing/internal/disposables/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,YAAY,EAAE,MAAM,mBAAmB,CAAC;AACjD,OAAO,EAAE,WAAW,EAAE,MAAM,kBAAkB,CAAC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../src/testing/internal/disposables/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,YAAY,EAAE,MAAM,mBAAmB,CAAC;AACjD,OAAO,EAAE,WAAW,EAAE,MAAM,kBAAkB,CAAC","sourcesContent":["export { spyOnConsole } from \"./spyOnConsole.js\";\nexport { withCleanup } from \"./withCleanup.js\";\n"]}
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
/// <reference types="node" />
|
|
2
|
+
/// <reference types="jest" />
|
|
3
|
+
type ConsoleMethod = "log" | "info" | "warn" | "error" | "debug";
|
|
4
|
+
type Spies<Keys extends ConsoleMethod[]> = Record<Keys[number], jest.SpyInstance<void, any[], any>>;
|
|
5
|
+
export declare function spyOnConsole<Keys extends ConsoleMethod[]>(...spyOn: Keys): Spies<Keys> & Disposable;
|
|
6
|
+
export declare namespace spyOnConsole {
|
|
7
|
+
var takeSnapshots: <Keys extends ConsoleMethod[]>(...spyOn: Keys) => Spies<Keys> & Disposable;
|
|
8
|
+
}
|
|
9
|
+
export {};
|
|
10
|
+
//# sourceMappingURL=spyOnConsole.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"spyOnConsole.d.ts","sourceRoot":"","sources":["../../../../src/testing/internal/disposables/spyOnConsole.ts"],"names":[],"mappings":";;AAKA,KAAK,aAAa,GAAG,KAAK,GAAG,MAAM,GAAG,MAAM,GAAG,OAAO,GAAG,OAAO,CAAC;AAEjE,KAAK,KAAK,CAAC,IAAI,SAAS,aAAa,EAAE,IAAI,MAAM,CAC/C,IAAI,CAAC,MAAM,CAAC,EACZ,IAAI,CAAC,WAAW,CAAC,IAAI,EAAE,GAAG,EAAE,EAAE,GAAG,CAAC,CACnC,CAAC;AAGF,wBAAgB,YAAY,CAAC,IAAI,SAAS,aAAa,EAAE,EACvD,GAAG,KAAK,EAAE,IAAI,GACb,KAAK,CAAC,IAAI,CAAC,GAAG,UAAU,CAW1B;yBAbe,YAAY"}
|
|
@@ -0,0 +1,33 @@
|
|
|
1
|
+
import { withCleanup } from "./withCleanup.js";
|
|
2
|
+
var noOp = function () { };
|
|
3
|
+
var restore = function (spy) { return spy.mockRestore(); };
|
|
4
|
+
export function spyOnConsole() {
|
|
5
|
+
var spyOn = [];
|
|
6
|
+
for (var _i = 0; _i < arguments.length; _i++) {
|
|
7
|
+
spyOn[_i] = arguments[_i];
|
|
8
|
+
}
|
|
9
|
+
var spies = {};
|
|
10
|
+
for (var _a = 0, spyOn_1 = spyOn; _a < spyOn_1.length; _a++) {
|
|
11
|
+
var key = spyOn_1[_a];
|
|
12
|
+
spies[key] = jest.spyOn(console, key).mockImplementation(noOp);
|
|
13
|
+
}
|
|
14
|
+
return withCleanup(spies, function (spies) {
|
|
15
|
+
for (var _i = 0, _a = Object.values(spies); _i < _a.length; _i++) {
|
|
16
|
+
var spy = _a[_i];
|
|
17
|
+
restore(spy);
|
|
18
|
+
}
|
|
19
|
+
});
|
|
20
|
+
}
|
|
21
|
+
spyOnConsole.takeSnapshots = function () {
|
|
22
|
+
var spyOn = [];
|
|
23
|
+
for (var _i = 0; _i < arguments.length; _i++) {
|
|
24
|
+
spyOn[_i] = arguments[_i];
|
|
25
|
+
}
|
|
26
|
+
return withCleanup(spyOnConsole.apply(void 0, spyOn), function (spies) {
|
|
27
|
+
for (var _i = 0, _a = Object.values(spies); _i < _a.length; _i++) {
|
|
28
|
+
var spy = _a[_i];
|
|
29
|
+
expect(spy).toMatchSnapshot();
|
|
30
|
+
}
|
|
31
|
+
});
|
|
32
|
+
};
|
|
33
|
+
//# sourceMappingURL=spyOnConsole.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"spyOnConsole.js","sourceRoot":"","sources":["../../../../src/testing/internal/disposables/spyOnConsole.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,WAAW,EAAE,MAAM,kBAAkB,CAAC;AAE/C,IAAM,IAAI,GAAG,cAAO,CAAC,CAAC;AACtB,IAAM,OAAO,GAAG,UAAC,GAAqB,IAAK,OAAA,GAAG,CAAC,WAAW,EAAE,EAAjB,CAAiB,CAAC;AAU7D,MAAM,UAAU,YAAY;IAC1B,eAAc;SAAd,UAAc,EAAd,qBAAc,EAAd,IAAc;QAAd,0BAAc;;IAEd,IAAM,KAAK,GAAG,EAAiB,CAAC;IAChC,KAAkB,UAAK,EAAL,eAAK,EAAL,mBAAK,EAAL,IAAK,EAAE;QAApB,IAAM,GAAG,cAAA;QAEZ,KAAK,CAAC,GAAG,CAAC,GAAG,IAAI,CAAC,KAAK,CAAC,OAAO,EAAE,GAAG,CAAC,CAAC,kBAAkB,CAAC,IAAI,CAAC,CAAC;KAChE;IACD,OAAO,WAAW,CAAC,KAAK,EAAE,UAAC,KAAK;QAC9B,KAAkB,UAA0C,EAA1C,KAAA,MAAM,CAAC,MAAM,CAAC,KAAK,CAAuB,EAA1C,cAA0C,EAA1C,IAA0C,EAAE;YAAzD,IAAM,GAAG,SAAA;YACZ,OAAO,CAAC,GAAG,CAAC,CAAC;SACd;IACH,CAAC,CAAC,CAAC;AACL,CAAC;AAED,YAAY,CAAC,aAAa,GAAG;IAC3B,eAAc;SAAd,UAAc,EAAd,qBAAc,EAAd,IAAc;QAAd,0BAAc;;IAEd,OAAA,WAAW,CAAC,YAAY,eAAI,KAAK,GAAG,UAAC,KAAK;QACxC,KAAkB,UAA0C,EAA1C,KAAA,MAAM,CAAC,MAAM,CAAC,KAAK,CAAuB,EAA1C,cAA0C,EAA1C,IAA0C,EAAE;YAAzD,IAAM,GAAG,SAAA;YACZ,MAAM,CAAC,GAAG,CAAC,CAAC,eAAe,EAAE,CAAC;SAC/B;IACH,CAAC,CAAC;AAJF,CAIE,CAAC","sourcesContent":["import { withCleanup } from \"./withCleanup.js\";\n\nconst noOp = () => {};\nconst restore = (spy: jest.SpyInstance) => spy.mockRestore();\n\ntype ConsoleMethod = \"log\" | \"info\" | \"warn\" | \"error\" | \"debug\";\n\ntype Spies<Keys extends ConsoleMethod[]> = Record<\n Keys[number],\n jest.SpyInstance<void, any[], any>\n>;\n\n/** @internal */\nexport function spyOnConsole<Keys extends ConsoleMethod[]>(\n ...spyOn: Keys\n): Spies<Keys> & Disposable {\n const spies = {} as Spies<Keys>;\n for (const key of spyOn) {\n // @ts-ignore\n spies[key] = jest.spyOn(console, key).mockImplementation(noOp);\n }\n return withCleanup(spies, (spies) => {\n for (const spy of Object.values(spies) as jest.SpyInstance[]) {\n restore(spy);\n }\n });\n}\n\nspyOnConsole.takeSnapshots = <Keys extends ConsoleMethod[]>(\n ...spyOn: Keys\n): Spies<Keys> & Disposable =>\n withCleanup(spyOnConsole(...spyOn), (spies) => {\n for (const spy of Object.values(spies) as jest.SpyInstance[]) {\n expect(spy).toMatchSnapshot();\n }\n });\n"]}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"withCleanup.d.ts","sourceRoot":"","sources":["../../../../src/testing/internal/disposables/withCleanup.ts"],"names":[],"mappings":";AACA,wBAAgB,WAAW,CAAC,CAAC,SAAS,MAAM,EAC1C,IAAI,EAAE,CAAC,EACP,OAAO,EAAE,CAAC,IAAI,EAAE,CAAC,KAAK,IAAI,GACzB,CAAC,GAAG,UAAU,CAYhB"}
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
import { __assign } from "tslib";
|
|
2
|
+
export function withCleanup(item, cleanup) {
|
|
3
|
+
var _a;
|
|
4
|
+
return __assign(__assign({}, item), (_a = {}, _a[Symbol.dispose] = function () {
|
|
5
|
+
cleanup(item);
|
|
6
|
+
if (Symbol.dispose in item) {
|
|
7
|
+
item[Symbol.dispose]();
|
|
8
|
+
}
|
|
9
|
+
}, _a));
|
|
10
|
+
}
|
|
11
|
+
//# sourceMappingURL=withCleanup.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"withCleanup.js","sourceRoot":"","sources":["../../../../src/testing/internal/disposables/withCleanup.ts"],"names":[],"mappings":";AACA,MAAM,UAAU,WAAW,CACzB,IAAO,EACP,OAA0B;;IAE1B,6BACK,IAAI,aACP,GAAC,MAAM,CAAC,OAAO,IAAf;QACE,OAAO,CAAC,IAAI,CAAC,CAAC;QAGd,IAAI,MAAM,CAAC,OAAO,IAAI,IAAI,EAAE;YACzB,IAAmB,CAAC,MAAM,CAAC,OAAO,CAAC,EAAE,CAAC;SACxC;IACH,CAAC,OACD;AACJ,CAAC","sourcesContent":["/** @internal */\nexport function withCleanup<T extends object>(\n item: T,\n cleanup: (item: T) => void\n): T & Disposable {\n return {\n ...item,\n [Symbol.dispose]() {\n cleanup(item);\n // if `item` already has a cleanup function, we also need to call the original cleanup function\n // (e.g. if something is wrapped in `withCleanup` twice)\n if (Symbol.dispose in item) {\n (item as Disposable)[Symbol.dispose]();\n }\n },\n };\n}\n"]}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/testing/internal/index.ts"],"names":[],"mappings":"AAAA,cAAc,oBAAoB,CAAC;AACnC,cAAc,wBAAwB,CAAC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../src/testing/internal/index.ts"],"names":[],"mappings":"AAAA,cAAc,oBAAoB,CAAC;AACnC,cAAc,wBAAwB,CAAC","sourcesContent":["export * from \"./profile/index.js\";\nexport * from \"./disposables/index.js\";\n"]}
|
|
@@ -0,0 +1,140 @@
|
|
|
1
|
+
import { screen } from "@testing-library/dom";
|
|
2
|
+
export interface BaseRender {
|
|
3
|
+
id: string;
|
|
4
|
+
phase: "mount" | "update" | "nested-update";
|
|
5
|
+
actualDuration: number;
|
|
6
|
+
baseDuration: number;
|
|
7
|
+
startTime: number;
|
|
8
|
+
commitTime: number;
|
|
9
|
+
count: number;
|
|
10
|
+
}
|
|
11
|
+
type Screen = typeof screen;
|
|
12
|
+
export type SyncScreen = {
|
|
13
|
+
[K in keyof Screen]: K extends `find${string}` ? {
|
|
14
|
+
(...args: Parameters<Screen[K]>): ReturnType<Screen[K]>;
|
|
15
|
+
} : Screen[K];
|
|
16
|
+
};
|
|
17
|
+
export interface Render<Snapshot> extends BaseRender {
|
|
18
|
+
snapshot: Snapshot;
|
|
19
|
+
readonly domSnapshot: HTMLElement;
|
|
20
|
+
withinDOM: () => SyncScreen;
|
|
21
|
+
}
|
|
22
|
+
export declare class RenderInstance<Snapshot> implements Render<Snapshot> {
|
|
23
|
+
snapshot: Snapshot;
|
|
24
|
+
private stringifiedDOM;
|
|
25
|
+
id: string;
|
|
26
|
+
phase: "mount" | "update" | "nested-update";
|
|
27
|
+
actualDuration: number;
|
|
28
|
+
baseDuration: number;
|
|
29
|
+
startTime: number;
|
|
30
|
+
commitTime: number;
|
|
31
|
+
count: number;
|
|
32
|
+
constructor(baseRender: BaseRender, snapshot: Snapshot, stringifiedDOM: string | undefined);
|
|
33
|
+
private _domSnapshot;
|
|
34
|
+
get domSnapshot(): HTMLElement;
|
|
35
|
+
get withinDOM(): () => {
|
|
36
|
+
getByLabelText<T extends HTMLElement = HTMLElement>(id: import("@testing-library/dom").Matcher, options?: import("@testing-library/dom").SelectorMatcherOptions | undefined): T;
|
|
37
|
+
getAllByLabelText<T_1 extends HTMLElement = HTMLElement>(id: import("@testing-library/dom").Matcher, options?: import("@testing-library/dom").SelectorMatcherOptions | undefined): T_1[];
|
|
38
|
+
queryByLabelText<T_2 extends HTMLElement = HTMLElement>(id: import("@testing-library/dom").Matcher, options?: import("@testing-library/dom").SelectorMatcherOptions | undefined): T_2 | null;
|
|
39
|
+
queryAllByLabelText<T_3 extends HTMLElement = HTMLElement>(id: import("@testing-library/dom").Matcher, options?: import("@testing-library/dom").SelectorMatcherOptions | undefined): T_3[];
|
|
40
|
+
findByLabelText<T_4 extends HTMLElement = HTMLElement>(id: import("@testing-library/dom").Matcher, options?: import("@testing-library/dom").SelectorMatcherOptions | undefined, waitForElementOptions?: import("@testing-library/dom").waitForOptions | undefined): Promise<T_4>;
|
|
41
|
+
findAllByLabelText<T_5 extends HTMLElement = HTMLElement>(id: import("@testing-library/dom").Matcher, options?: import("@testing-library/dom").SelectorMatcherOptions | undefined, waitForElementOptions?: import("@testing-library/dom").waitForOptions | undefined): Promise<T_5[]>;
|
|
42
|
+
getByPlaceholderText<T_6 extends HTMLElement = HTMLElement>(id: import("@testing-library/dom").Matcher, options?: import("@testing-library/dom").MatcherOptions | undefined): T_6;
|
|
43
|
+
getAllByPlaceholderText<T_7 extends HTMLElement = HTMLElement>(id: import("@testing-library/dom").Matcher, options?: import("@testing-library/dom").MatcherOptions | undefined): T_7[];
|
|
44
|
+
queryByPlaceholderText<T_8 extends HTMLElement = HTMLElement>(id: import("@testing-library/dom").Matcher, options?: import("@testing-library/dom").MatcherOptions | undefined): T_8 | null;
|
|
45
|
+
queryAllByPlaceholderText<T_9 extends HTMLElement = HTMLElement>(id: import("@testing-library/dom").Matcher, options?: import("@testing-library/dom").MatcherOptions | undefined): T_9[];
|
|
46
|
+
findByPlaceholderText<T_10 extends HTMLElement = HTMLElement>(id: import("@testing-library/dom").Matcher, options?: import("@testing-library/dom").MatcherOptions | undefined, waitForElementOptions?: import("@testing-library/dom").waitForOptions | undefined): Promise<T_10>;
|
|
47
|
+
findAllByPlaceholderText<T_11 extends HTMLElement = HTMLElement>(id: import("@testing-library/dom").Matcher, options?: import("@testing-library/dom").MatcherOptions | undefined, waitForElementOptions?: import("@testing-library/dom").waitForOptions | undefined): Promise<T_11[]>;
|
|
48
|
+
getByText<T_12 extends HTMLElement = HTMLElement>(id: import("@testing-library/dom").Matcher, options?: import("@testing-library/dom").SelectorMatcherOptions | undefined): T_12;
|
|
49
|
+
getAllByText<T_13 extends HTMLElement = HTMLElement>(id: import("@testing-library/dom").Matcher, options?: import("@testing-library/dom").SelectorMatcherOptions | undefined): T_13[];
|
|
50
|
+
queryByText<T_14 extends HTMLElement = HTMLElement>(id: import("@testing-library/dom").Matcher, options?: import("@testing-library/dom").SelectorMatcherOptions | undefined): T_14 | null;
|
|
51
|
+
queryAllByText<T_15 extends HTMLElement = HTMLElement>(id: import("@testing-library/dom").Matcher, options?: import("@testing-library/dom").SelectorMatcherOptions | undefined): T_15[];
|
|
52
|
+
findByText<T_16 extends HTMLElement = HTMLElement>(id: import("@testing-library/dom").Matcher, options?: import("@testing-library/dom").SelectorMatcherOptions | undefined, waitForElementOptions?: import("@testing-library/dom").waitForOptions | undefined): Promise<T_16>;
|
|
53
|
+
findAllByText<T_17 extends HTMLElement = HTMLElement>(id: import("@testing-library/dom").Matcher, options?: import("@testing-library/dom").SelectorMatcherOptions | undefined, waitForElementOptions?: import("@testing-library/dom").waitForOptions | undefined): Promise<T_17[]>;
|
|
54
|
+
getByAltText<T_18 extends HTMLElement = HTMLElement>(id: import("@testing-library/dom").Matcher, options?: import("@testing-library/dom").MatcherOptions | undefined): T_18;
|
|
55
|
+
getAllByAltText<T_19 extends HTMLElement = HTMLElement>(id: import("@testing-library/dom").Matcher, options?: import("@testing-library/dom").MatcherOptions | undefined): T_19[];
|
|
56
|
+
queryByAltText<T_20 extends HTMLElement = HTMLElement>(id: import("@testing-library/dom").Matcher, options?: import("@testing-library/dom").MatcherOptions | undefined): T_20 | null;
|
|
57
|
+
queryAllByAltText<T_21 extends HTMLElement = HTMLElement>(id: import("@testing-library/dom").Matcher, options?: import("@testing-library/dom").MatcherOptions | undefined): T_21[];
|
|
58
|
+
findByAltText<T_22 extends HTMLElement = HTMLElement>(id: import("@testing-library/dom").Matcher, options?: import("@testing-library/dom").MatcherOptions | undefined, waitForElementOptions?: import("@testing-library/dom").waitForOptions | undefined): Promise<T_22>;
|
|
59
|
+
findAllByAltText<T_23 extends HTMLElement = HTMLElement>(id: import("@testing-library/dom").Matcher, options?: import("@testing-library/dom").MatcherOptions | undefined, waitForElementOptions?: import("@testing-library/dom").waitForOptions | undefined): Promise<T_23[]>;
|
|
60
|
+
getByTitle<T_24 extends HTMLElement = HTMLElement>(id: import("@testing-library/dom").Matcher, options?: import("@testing-library/dom").MatcherOptions | undefined): T_24;
|
|
61
|
+
getAllByTitle<T_25 extends HTMLElement = HTMLElement>(id: import("@testing-library/dom").Matcher, options?: import("@testing-library/dom").MatcherOptions | undefined): T_25[];
|
|
62
|
+
queryByTitle<T_26 extends HTMLElement = HTMLElement>(id: import("@testing-library/dom").Matcher, options?: import("@testing-library/dom").MatcherOptions | undefined): T_26 | null;
|
|
63
|
+
queryAllByTitle<T_27 extends HTMLElement = HTMLElement>(id: import("@testing-library/dom").Matcher, options?: import("@testing-library/dom").MatcherOptions | undefined): T_27[];
|
|
64
|
+
findByTitle<T_28 extends HTMLElement = HTMLElement>(id: import("@testing-library/dom").Matcher, options?: import("@testing-library/dom").MatcherOptions | undefined, waitForElementOptions?: import("@testing-library/dom").waitForOptions | undefined): Promise<T_28>;
|
|
65
|
+
findAllByTitle<T_29 extends HTMLElement = HTMLElement>(id: import("@testing-library/dom").Matcher, options?: import("@testing-library/dom").MatcherOptions | undefined, waitForElementOptions?: import("@testing-library/dom").waitForOptions | undefined): Promise<T_29[]>;
|
|
66
|
+
getByDisplayValue<T_30 extends HTMLElement = HTMLElement>(id: import("@testing-library/dom").Matcher, options?: import("@testing-library/dom").MatcherOptions | undefined): T_30;
|
|
67
|
+
getAllByDisplayValue<T_31 extends HTMLElement = HTMLElement>(id: import("@testing-library/dom").Matcher, options?: import("@testing-library/dom").MatcherOptions | undefined): T_31[];
|
|
68
|
+
queryByDisplayValue<T_32 extends HTMLElement = HTMLElement>(id: import("@testing-library/dom").Matcher, options?: import("@testing-library/dom").MatcherOptions | undefined): T_32 | null;
|
|
69
|
+
queryAllByDisplayValue<T_33 extends HTMLElement = HTMLElement>(id: import("@testing-library/dom").Matcher, options?: import("@testing-library/dom").MatcherOptions | undefined): T_33[];
|
|
70
|
+
findByDisplayValue<T_34 extends HTMLElement = HTMLElement>(id: import("@testing-library/dom").Matcher, options?: import("@testing-library/dom").MatcherOptions | undefined, waitForElementOptions?: import("@testing-library/dom").waitForOptions | undefined): Promise<T_34>;
|
|
71
|
+
findAllByDisplayValue<T_35 extends HTMLElement = HTMLElement>(id: import("@testing-library/dom").Matcher, options?: import("@testing-library/dom").MatcherOptions | undefined, waitForElementOptions?: import("@testing-library/dom").waitForOptions | undefined): Promise<T_35[]>;
|
|
72
|
+
getByRole<T_36 extends HTMLElement = HTMLElement>(role: import("@testing-library/dom").ByRoleMatcher, options?: import("@testing-library/dom").ByRoleOptions | undefined): T_36;
|
|
73
|
+
getAllByRole<T_37 extends HTMLElement = HTMLElement>(role: import("@testing-library/dom").ByRoleMatcher, options?: import("@testing-library/dom").ByRoleOptions | undefined): T_37[];
|
|
74
|
+
queryByRole<T_38 extends HTMLElement = HTMLElement>(role: import("@testing-library/dom").ByRoleMatcher, options?: import("@testing-library/dom").ByRoleOptions | undefined): T_38 | null;
|
|
75
|
+
queryAllByRole<T_39 extends HTMLElement = HTMLElement>(role: import("@testing-library/dom").ByRoleMatcher, options?: import("@testing-library/dom").ByRoleOptions | undefined): T_39[];
|
|
76
|
+
findByRole<T_40 extends HTMLElement = HTMLElement>(role: import("@testing-library/dom").ByRoleMatcher, options?: import("@testing-library/dom").ByRoleOptions | undefined, waitForElementOptions?: import("@testing-library/dom").waitForOptions | undefined): Promise<T_40>;
|
|
77
|
+
findAllByRole<T_41 extends HTMLElement = HTMLElement>(role: import("@testing-library/dom").ByRoleMatcher, options?: import("@testing-library/dom").ByRoleOptions | undefined, waitForElementOptions?: import("@testing-library/dom").waitForOptions | undefined): Promise<T_41[]>;
|
|
78
|
+
getByTestId<T_42 extends HTMLElement = HTMLElement>(id: import("@testing-library/dom").Matcher, options?: import("@testing-library/dom").MatcherOptions | undefined): T_42;
|
|
79
|
+
getAllByTestId<T_43 extends HTMLElement = HTMLElement>(id: import("@testing-library/dom").Matcher, options?: import("@testing-library/dom").MatcherOptions | undefined): T_43[];
|
|
80
|
+
queryByTestId<T_44 extends HTMLElement = HTMLElement>(id: import("@testing-library/dom").Matcher, options?: import("@testing-library/dom").MatcherOptions | undefined): T_44 | null;
|
|
81
|
+
queryAllByTestId<T_45 extends HTMLElement = HTMLElement>(id: import("@testing-library/dom").Matcher, options?: import("@testing-library/dom").MatcherOptions | undefined): T_45[];
|
|
82
|
+
findByTestId<T_46 extends HTMLElement = HTMLElement>(id: import("@testing-library/dom").Matcher, options?: import("@testing-library/dom").MatcherOptions | undefined, waitForElementOptions?: import("@testing-library/dom").waitForOptions | undefined): Promise<T_46>;
|
|
83
|
+
findAllByTestId<T_47 extends HTMLElement = HTMLElement>(id: import("@testing-library/dom").Matcher, options?: import("@testing-library/dom").MatcherOptions | undefined, waitForElementOptions?: import("@testing-library/dom").waitForOptions | undefined): Promise<T_47[]>;
|
|
84
|
+
} & {
|
|
85
|
+
getByLabelText: (id: import("@testing-library/dom").Matcher, options?: import("@testing-library/dom").SelectorMatcherOptions | undefined) => HTMLElement;
|
|
86
|
+
getAllByLabelText: (id: import("@testing-library/dom").Matcher, options?: import("@testing-library/dom").SelectorMatcherOptions | undefined) => HTMLElement[];
|
|
87
|
+
queryByLabelText: (id: import("@testing-library/dom").Matcher, options?: import("@testing-library/dom").SelectorMatcherOptions | undefined) => HTMLElement | null;
|
|
88
|
+
queryAllByLabelText: (id: import("@testing-library/dom").Matcher, options?: import("@testing-library/dom").SelectorMatcherOptions | undefined) => HTMLElement[];
|
|
89
|
+
findByLabelText: (id: import("@testing-library/dom").Matcher, options?: import("@testing-library/dom").SelectorMatcherOptions | undefined, waitForElementOptions?: import("@testing-library/dom").waitForOptions | undefined) => Promise<HTMLElement>;
|
|
90
|
+
findAllByLabelText: (id: import("@testing-library/dom").Matcher, options?: import("@testing-library/dom").SelectorMatcherOptions | undefined, waitForElementOptions?: import("@testing-library/dom").waitForOptions | undefined) => Promise<HTMLElement[]>;
|
|
91
|
+
getByPlaceholderText: (id: import("@testing-library/dom").Matcher, options?: import("@testing-library/dom").MatcherOptions | undefined) => HTMLElement;
|
|
92
|
+
getAllByPlaceholderText: (id: import("@testing-library/dom").Matcher, options?: import("@testing-library/dom").MatcherOptions | undefined) => HTMLElement[];
|
|
93
|
+
queryByPlaceholderText: (id: import("@testing-library/dom").Matcher, options?: import("@testing-library/dom").MatcherOptions | undefined) => HTMLElement | null;
|
|
94
|
+
queryAllByPlaceholderText: (id: import("@testing-library/dom").Matcher, options?: import("@testing-library/dom").MatcherOptions | undefined) => HTMLElement[];
|
|
95
|
+
findByPlaceholderText: (id: import("@testing-library/dom").Matcher, options?: import("@testing-library/dom").MatcherOptions | undefined, waitForElementOptions?: import("@testing-library/dom").waitForOptions | undefined) => Promise<HTMLElement>;
|
|
96
|
+
findAllByPlaceholderText: (id: import("@testing-library/dom").Matcher, options?: import("@testing-library/dom").MatcherOptions | undefined, waitForElementOptions?: import("@testing-library/dom").waitForOptions | undefined) => Promise<HTMLElement[]>;
|
|
97
|
+
getByText: (id: import("@testing-library/dom").Matcher, options?: import("@testing-library/dom").SelectorMatcherOptions | undefined) => HTMLElement;
|
|
98
|
+
getAllByText: (id: import("@testing-library/dom").Matcher, options?: import("@testing-library/dom").SelectorMatcherOptions | undefined) => HTMLElement[];
|
|
99
|
+
queryByText: (id: import("@testing-library/dom").Matcher, options?: import("@testing-library/dom").SelectorMatcherOptions | undefined) => HTMLElement | null;
|
|
100
|
+
queryAllByText: (id: import("@testing-library/dom").Matcher, options?: import("@testing-library/dom").SelectorMatcherOptions | undefined) => HTMLElement[];
|
|
101
|
+
findByText: (id: import("@testing-library/dom").Matcher, options?: import("@testing-library/dom").SelectorMatcherOptions | undefined, waitForElementOptions?: import("@testing-library/dom").waitForOptions | undefined) => Promise<HTMLElement>;
|
|
102
|
+
findAllByText: (id: import("@testing-library/dom").Matcher, options?: import("@testing-library/dom").SelectorMatcherOptions | undefined, waitForElementOptions?: import("@testing-library/dom").waitForOptions | undefined) => Promise<HTMLElement[]>;
|
|
103
|
+
getByAltText: (id: import("@testing-library/dom").Matcher, options?: import("@testing-library/dom").MatcherOptions | undefined) => HTMLElement;
|
|
104
|
+
getAllByAltText: (id: import("@testing-library/dom").Matcher, options?: import("@testing-library/dom").MatcherOptions | undefined) => HTMLElement[];
|
|
105
|
+
queryByAltText: (id: import("@testing-library/dom").Matcher, options?: import("@testing-library/dom").MatcherOptions | undefined) => HTMLElement | null;
|
|
106
|
+
queryAllByAltText: (id: import("@testing-library/dom").Matcher, options?: import("@testing-library/dom").MatcherOptions | undefined) => HTMLElement[];
|
|
107
|
+
findByAltText: (id: import("@testing-library/dom").Matcher, options?: import("@testing-library/dom").MatcherOptions | undefined, waitForElementOptions?: import("@testing-library/dom").waitForOptions | undefined) => Promise<HTMLElement>;
|
|
108
|
+
findAllByAltText: (id: import("@testing-library/dom").Matcher, options?: import("@testing-library/dom").MatcherOptions | undefined, waitForElementOptions?: import("@testing-library/dom").waitForOptions | undefined) => Promise<HTMLElement[]>;
|
|
109
|
+
getByTitle: (id: import("@testing-library/dom").Matcher, options?: import("@testing-library/dom").MatcherOptions | undefined) => HTMLElement;
|
|
110
|
+
getAllByTitle: (id: import("@testing-library/dom").Matcher, options?: import("@testing-library/dom").MatcherOptions | undefined) => HTMLElement[];
|
|
111
|
+
queryByTitle: (id: import("@testing-library/dom").Matcher, options?: import("@testing-library/dom").MatcherOptions | undefined) => HTMLElement | null;
|
|
112
|
+
queryAllByTitle: (id: import("@testing-library/dom").Matcher, options?: import("@testing-library/dom").MatcherOptions | undefined) => HTMLElement[];
|
|
113
|
+
findByTitle: (id: import("@testing-library/dom").Matcher, options?: import("@testing-library/dom").MatcherOptions | undefined, waitForElementOptions?: import("@testing-library/dom").waitForOptions | undefined) => Promise<HTMLElement>;
|
|
114
|
+
findAllByTitle: (id: import("@testing-library/dom").Matcher, options?: import("@testing-library/dom").MatcherOptions | undefined, waitForElementOptions?: import("@testing-library/dom").waitForOptions | undefined) => Promise<HTMLElement[]>;
|
|
115
|
+
getByDisplayValue: (id: import("@testing-library/dom").Matcher, options?: import("@testing-library/dom").MatcherOptions | undefined) => HTMLElement;
|
|
116
|
+
getAllByDisplayValue: (id: import("@testing-library/dom").Matcher, options?: import("@testing-library/dom").MatcherOptions | undefined) => HTMLElement[];
|
|
117
|
+
queryByDisplayValue: (id: import("@testing-library/dom").Matcher, options?: import("@testing-library/dom").MatcherOptions | undefined) => HTMLElement | null;
|
|
118
|
+
queryAllByDisplayValue: (id: import("@testing-library/dom").Matcher, options?: import("@testing-library/dom").MatcherOptions | undefined) => HTMLElement[];
|
|
119
|
+
findByDisplayValue: (id: import("@testing-library/dom").Matcher, options?: import("@testing-library/dom").MatcherOptions | undefined, waitForElementOptions?: import("@testing-library/dom").waitForOptions | undefined) => Promise<HTMLElement>;
|
|
120
|
+
findAllByDisplayValue: (id: import("@testing-library/dom").Matcher, options?: import("@testing-library/dom").MatcherOptions | undefined, waitForElementOptions?: import("@testing-library/dom").waitForOptions | undefined) => Promise<HTMLElement[]>;
|
|
121
|
+
getByRole: (role: import("@testing-library/dom").ByRoleMatcher, options?: import("@testing-library/dom").ByRoleOptions | undefined) => HTMLElement;
|
|
122
|
+
getAllByRole: (role: import("@testing-library/dom").ByRoleMatcher, options?: import("@testing-library/dom").ByRoleOptions | undefined) => HTMLElement[];
|
|
123
|
+
queryByRole: (role: import("@testing-library/dom").ByRoleMatcher, options?: import("@testing-library/dom").ByRoleOptions | undefined) => HTMLElement | null;
|
|
124
|
+
queryAllByRole: (role: import("@testing-library/dom").ByRoleMatcher, options?: import("@testing-library/dom").ByRoleOptions | undefined) => HTMLElement[];
|
|
125
|
+
findByRole: (role: import("@testing-library/dom").ByRoleMatcher, options?: import("@testing-library/dom").ByRoleOptions | undefined, waitForElementOptions?: import("@testing-library/dom").waitForOptions | undefined) => Promise<HTMLElement>;
|
|
126
|
+
findAllByRole: (role: import("@testing-library/dom").ByRoleMatcher, options?: import("@testing-library/dom").ByRoleOptions | undefined, waitForElementOptions?: import("@testing-library/dom").waitForOptions | undefined) => Promise<HTMLElement[]>;
|
|
127
|
+
getByTestId: (id: import("@testing-library/dom").Matcher, options?: import("@testing-library/dom").MatcherOptions | undefined) => HTMLElement;
|
|
128
|
+
getAllByTestId: (id: import("@testing-library/dom").Matcher, options?: import("@testing-library/dom").MatcherOptions | undefined) => HTMLElement[];
|
|
129
|
+
queryByTestId: (id: import("@testing-library/dom").Matcher, options?: import("@testing-library/dom").MatcherOptions | undefined) => HTMLElement | null;
|
|
130
|
+
queryAllByTestId: (id: import("@testing-library/dom").Matcher, options?: import("@testing-library/dom").MatcherOptions | undefined) => HTMLElement[];
|
|
131
|
+
findByTestId: (id: import("@testing-library/dom").Matcher, options?: import("@testing-library/dom").MatcherOptions | undefined, waitForElementOptions?: import("@testing-library/dom").waitForOptions | undefined) => Promise<HTMLElement>;
|
|
132
|
+
findAllByTestId: (id: import("@testing-library/dom").Matcher, options?: import("@testing-library/dom").MatcherOptions | undefined, waitForElementOptions?: import("@testing-library/dom").waitForOptions | undefined) => Promise<HTMLElement[]>;
|
|
133
|
+
} & {
|
|
134
|
+
debug: (element?: Element | HTMLDocument | (Element | HTMLDocument)[] | undefined, maxLength?: number | undefined, options?: import("pretty-format").PrettyFormatOptions | undefined) => void;
|
|
135
|
+
logTestingPlaygroundURL: (element?: Element | HTMLDocument | undefined) => void;
|
|
136
|
+
};
|
|
137
|
+
}
|
|
138
|
+
export declare function errorOnDomInteraction(): void;
|
|
139
|
+
export {};
|
|
140
|
+
//# sourceMappingURL=Render.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"Render.d.ts","sourceRoot":"","sources":["../../../../src/testing/internal/profile/Render.tsx"],"names":[],"mappings":"AAWA,OAAO,EAAU,MAAM,EAAE,MAAM,sBAAsB,CAAC;AAKtD,MAAM,WAAW,UAAU;IACzB,EAAE,EAAE,MAAM,CAAC;IACX,KAAK,EAAE,OAAO,GAAG,QAAQ,GAAG,eAAe,CAAC;IAC5C,cAAc,EAAE,MAAM,CAAC;IACvB,YAAY,EAAE,MAAM,CAAC;IACrB,SAAS,EAAE,MAAM,CAAC;IAClB,UAAU,EAAE,MAAM,CAAC;IAInB,KAAK,EAAE,MAAM,CAAC;CACf;AAED,KAAK,MAAM,GAAG,OAAO,MAAM,CAAC;AAE5B,MAAM,MAAM,UAAU,GAAG;KACtB,CAAC,IAAI,MAAM,MAAM,GAAG,CAAC,SAAS,OAAO,MAAM,EAAE,GAC1C;QAEE,CAAC,GAAG,IAAI,EAAE,UAAU,CAAC,MAAM,CAAC,CAAC,CAAC,CAAC,GAAG,UAAU,CAAC,MAAM,CAAC,CAAC,CAAC,CAAC,CAAC;KACzD,GACD,MAAM,CAAC,CAAC,CAAC;CACd,CAAC;AAGF,MAAM,WAAW,MAAM,CAAC,QAAQ,CAAE,SAAQ,UAAU;IAKlD,QAAQ,EAAE,QAAQ,CAAC;IAKnB,QAA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