relay-test-utils-internal 16.2.0 → 18.0.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/consoleErrorsAndWarnings.js.flow +1 -0
- package/generateTestsFromFixtures.js.flow +1 -1
- package/index.js +1 -1
- package/index.js.flow +9 -0
- package/lib/generateTestsFromFixtures.js +1 -1
- package/lib/index.js +10 -0
- package/lib/testschema.graphql +1 -0
- package/package.json +3 -3
- package/relay-test-utils-internal.js +2 -2
- package/relay-test-utils-internal.min.js +2 -2
@@ -22,7 +22,7 @@ const path = require('path');
|
|
22
22
|
*/
|
23
23
|
const FIXTURE_TAG = Symbol.for('FIXTURE_TAG');
|
24
24
|
expect.addSnapshotSerializer({
|
25
|
-
|
25
|
+
serialize(value) {
|
26
26
|
return Object.keys(value)
|
27
27
|
.map(key => `~~~~~~~~~~ ${key.toUpperCase()} ~~~~~~~~~~\n${value[key]}`)
|
28
28
|
.join('\n');
|
package/index.js
CHANGED
package/index.js.flow
CHANGED
@@ -56,6 +56,14 @@ function cannotReadPropertyOfUndefined__DEPRECATED(
|
|
56
56
|
return `Cannot read properties of undefined (reading '${propertyName}')`;
|
57
57
|
}
|
58
58
|
|
59
|
+
function skipIf(condition: string | void, ...args: Array<any>) {
|
60
|
+
const testName = args.length > 0 ? args[0] : 'N/A';
|
61
|
+
console.warn(
|
62
|
+
`The test "${testName}" is being skipped in open source. TODO: T192916613`,
|
63
|
+
);
|
64
|
+
condition === 'true' ? test.skip(...args) : test(...args);
|
65
|
+
}
|
66
|
+
|
59
67
|
/**
|
60
68
|
* The public interface to Relay Test Utils.
|
61
69
|
*/
|
@@ -80,6 +88,7 @@ module.exports = {
|
|
80
88
|
matchers: Matchers,
|
81
89
|
printAST,
|
82
90
|
simpleClone,
|
91
|
+
skipIf,
|
83
92
|
trackRetentionForEnvironment,
|
84
93
|
unwrapContainer,
|
85
94
|
};
|
@@ -7,7 +7,7 @@ var fs = require('fs');
|
|
7
7
|
var path = require('path');
|
8
8
|
var FIXTURE_TAG = Symbol["for"]('FIXTURE_TAG');
|
9
9
|
expect.addSnapshotSerializer({
|
10
|
-
|
10
|
+
serialize: function serialize(value) {
|
11
11
|
return Object.keys(value).map(function (key) {
|
12
12
|
return "~~~~~~~~~~ ".concat(key.toUpperCase(), " ~~~~~~~~~~\n").concat(value[key]);
|
13
13
|
}).join('\n');
|
package/lib/index.js
CHANGED
@@ -34,6 +34,15 @@ function cannotReadPropertyOfUndefined__DEPRECATED(propertyName) {
|
|
34
34
|
}
|
35
35
|
return "Cannot read properties of undefined (reading '".concat(propertyName, "')");
|
36
36
|
}
|
37
|
+
function skipIf(condition) {
|
38
|
+
var _test;
|
39
|
+
for (var _len = arguments.length, args = new Array(_len > 1 ? _len - 1 : 0), _key = 1; _key < _len; _key++) {
|
40
|
+
args[_key - 1] = arguments[_key];
|
41
|
+
}
|
42
|
+
var testName = args.length > 0 ? args[0] : 'N/A';
|
43
|
+
console.warn("The test \"".concat(testName, "\" is being skipped in open source. TODO: T192916613"));
|
44
|
+
condition === 'true' ? (_test = test).skip.apply(_test, args) : test.apply(void 0, args);
|
45
|
+
}
|
37
46
|
module.exports = {
|
38
47
|
cannotReadPropertyOfUndefined__DEPRECATED: cannotReadPropertyOfUndefined__DEPRECATED,
|
39
48
|
createMockEnvironment: createMockEnvironment,
|
@@ -55,6 +64,7 @@ module.exports = {
|
|
55
64
|
matchers: Matchers,
|
56
65
|
printAST: printAST,
|
57
66
|
simpleClone: simpleClone,
|
67
|
+
skipIf: skipIf,
|
58
68
|
trackRetentionForEnvironment: trackRetentionForEnvironment,
|
59
69
|
unwrapContainer: unwrapContainer
|
60
70
|
};
|
package/lib/testschema.graphql
CHANGED
package/package.json
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
{
|
2
2
|
"name": "relay-test-utils-internal",
|
3
3
|
"description": "Internal utilities for testing Relay.",
|
4
|
-
"version": "
|
4
|
+
"version": "18.0.0",
|
5
5
|
"keywords": [
|
6
6
|
"graphql",
|
7
7
|
"relay"
|
@@ -15,9 +15,9 @@
|
|
15
15
|
"directory": "packages/relay-test-utils-internal"
|
16
16
|
},
|
17
17
|
"dependencies": {
|
18
|
-
"@babel/runtime": "^7.
|
18
|
+
"@babel/runtime": "^7.25.0",
|
19
19
|
"fbjs": "^3.0.2",
|
20
|
-
"relay-runtime": "
|
20
|
+
"relay-runtime": "18.0.0"
|
21
21
|
},
|
22
22
|
"directories": {
|
23
23
|
"": "./"
|
@@ -1,4 +1,4 @@
|
|
1
1
|
/**
|
2
|
-
* Relay
|
2
|
+
* Relay v18.0.0
|
3
3
|
*/
|
4
|
-
(()=>{"use strict";var e={115:(e,n,
|
4
|
+
(()=>{"use strict";var e={115:(e,n,t)=>{e.exports={toBeDeeplyFrozen:function(e){return function e(n){if(expect(Object.isFrozen(n)).toBe(!0),Array.isArray(n))n.forEach((function(n){return e(n)}));else if("object"==typeof n&&null!==n)for(var t in n)e(n[t])}(e),{pass:!0}},toWarn:function(e,n){var r=this.isNot;function o(e){return e instanceof RegExp?e.toString():JSON.stringify(e)}function a(e){return"["+e.map(o).join(", ")+"]"}function i(e){return e.length?e.map((function(e){return a([!!e[0]].concat(e.slice(1)))})).join(", "):"[]"}var s=t(520);if(!s.mock)throw new Error("toWarn(): Requires `jest.mock('warning')`.");var c=s.mock.calls.length;e();var l=s.mock.calls.slice(c);return n?(Array.isArray(n)||(n=[n]),{pass:!!l.find((function(e){return e.length===n.length+1&&e.every((function(e,t){if(!t)return!e;var r=n[t-1];return r instanceof RegExp?r.test(e):e===r}))})),message:function(){return"Expected ".concat(r?"not ":"","to warn: ")+"".concat(a([!1].concat(n))," but ")+"`warning` received the following calls: "+"".concat(i(l),".")}}):{pass:!!l.filter((function(e){return!e[0]})).length,message:function(){return"Expected ".concat(r?"not ":"","to warn but ")+"`warning` received the following calls: "+"".concat(i(l),".")}}}}},815:(e,n,t)=>{var r=(0,t(489).createConsoleInterceptionSystem)("error","expectConsoleError",(function(e){jest.spyOn(console,"error").mockImplementation(e)}));e.exports={disallowConsoleErrors:function(){r.disallowMessages()},expectConsoleErrorWillFire:function(e,n){r.expectMessageWillFire(e,n)},expectConsoleError:function(e,n){return r.expectMessage(e,n)},expectConsoleErrorsMany:function(e,n){return r.expectMessageMany(e,n)}}},489:(e,n,t)=>{var r=(0,t(193).default)(t(759)),o=console.error;e.exports={createConsoleInterceptionSystem:function(e,n,t){var a=!1,i=[],s=[],c=[],l=e.charAt(0).toUpperCase()+e.slice(1),u=l+"s",p="disallow".concat(l,"s");function f(e){var n=i.findIndex((function(n){return e.startsWith(n)})),t=s.findIndex((function(n){return e.startsWith(n)}));if(c.length>0&&e.startsWith(c[0]))c.shift();else if(n>=0)i.splice(n,1);else{if(!(t>=0))throw o("Unexpected ".concat(l,": ")+e),new Error("".concat(l,": ")+e);s.splice(t,1)}}function g(t,o){if(c.length>0)throw new Error("Cannot nest ".concat(n,"() calls."));c.push.apply(c,(0,r.default)(t));var a=o();if(c.length>0){var i=c.toString();throw c.length=0,new Error("Expected ".concat(e," in callback: ").concat(i))}return a}return{disallowMessages:function(){if(a)throw new Error("".concat(p," should be called only once."));a=!0,t(f),afterEach((function(){if(s.length=0,c.length=0,i.length>0){var n=new Error("Some ".concat(i.length," expected ").concat(e,"s where not triggered:\n\n")+Array.from(i,(function(e){return" * ".concat(e)})).join("\n")+"\n");throw i.length=0,n}}))},expectMessageWillFire:function(e,n){if(!a)throw new Error("".concat(p," needs to be called before expect").concat(u,"WillFire"));for(var t=!0===(null==n?void 0:n.optional),r=0;r<(null!==(o=null==n?void 0:n.count)&&void 0!==o?o:1);r++){var o;(t?s:i).push(e)}},expectMessage:function(e,n){return g([e],n)},expectMessageMany:g}}}},15:(e,n,t)=>{var r=(0,t(489).createConsoleInterceptionSystem)("warning","expectConsoleWarning",(function(e){jest.spyOn(console,"warn").mockImplementation(e)}));e.exports={disallowConsoleWarnings:function(){r.disallowMessages()},expectConsoleWarningWillFire:function(e,n){r.expectMessageWillFire(e,n)},expectConsoleWarning:function(e,n){return r.expectMessage(e,n)},expectConsoleWarningsMany:function(e,n){return r.expectMessageMany(e,n)}}},377:(e,n,t)=>{var r=(0,t(193).default)(t(56));e.exports=function(e,n,o){describe.each(e)("".concat(n," - Feature flags: %o"),(function(e){var n;beforeEach((function(){var o=t(268).RelayFeatureFlags;n=(0,r.default)({},o),Object.assign(o,e)})),afterEach((function(){var e=t(268).RelayFeatureFlags;Object.assign(e,n)})),o()}))}},436:(e,n,t)=>{var r=(0,t(193).default)(t(195)),o=t(861),a=t(48),i=t(315),s=Symbol.for("FIXTURE_TAG");expect.addSnapshotSerializer({serialize:function(e){return Object.keys(e).map((function(n){return"~~~~~~~~~~ ".concat(n.toUpperCase()," ~~~~~~~~~~\n").concat(e[n])})).join("\n")},test:function(e){return e&&!0===e[s]}}),e.exports={generateTestsFromFixtures:function(e,n){var t=a.readdirSync(e);test("has fixtures in ".concat(e),(function(){expect(t.length>0).toBe(!0)}));var c=t.filter((function(e){return e.startsWith("only.")}));c.length&&(test.skip.each(t.filter((function(e){return!e.startsWith("only.")})))("matches expected output: %s",(function(){})),t=c),test.each(t)("matches expected output: %s",(function(t){var c,l=a.readFileSync(i.join(e,t),"utf8"),u=o(l,n,t);expect((c={},(0,r.default)(c,s,!0),(0,r.default)(c,"input",l),(0,r.default)(c,"output",u),c)).toMatchSnapshot()}))},FIXTURE_TAG:s}},861:e=>{e.exports=function(e,n,t){if(/^# *expected-to-throw/.test(e)||/\.error\.\w+$/.test(t)){var r;try{r=n(e)}catch(e){return"THROWN EXCEPTION:\n\n".concat(e.toString())}throw new Error("Expected test file '".concat(t,"' to throw, but it passed:\n").concat(r))}return n(e)}},310:(e,n,t)=>{var r=t(815),o=r.disallowConsoleErrors,a=r.expectConsoleError,i=r.expectConsoleErrorsMany,s=r.expectConsoleErrorWillFire,c=t(15),l=c.disallowConsoleWarnings,u=c.expectConsoleWarning,p=c.expectConsoleWarningsMany,f=c.expectConsoleWarningWillFire,g=t(377),d=t(436),x=d.FIXTURE_TAG,h=d.generateTestsFromFixtures,v=t(115),y=t(805),w=t(85),W=t(455),E=t(791),m=E.disallowWarnings,C=E.expectToWarn,b=E.expectToWarnMany,F=E.expectWarningWillFire,M=t(371),T=M.createMockEnvironment,j=M.unwrapContainer;e.exports={cannotReadPropertyOfUndefined__DEPRECATED:function(e){var n=process.version.match(/^v(\d+)\./),t=null==n?null:parseInt(n[1],10);return null==t||t<16?"Cannot read property '".concat(e,"' of undefined"):"Cannot read properties of undefined (reading '".concat(e,"')")},createMockEnvironment:T,describeWithFeatureFlags:g,disallowConsoleErrors:o,disallowConsoleWarnings:l,disallowWarnings:m,expectConsoleError:a,expectConsoleErrorsMany:i,expectConsoleErrorWillFire:s,expectConsoleWarningWillFire:f,expectConsoleWarning:u,expectConsoleWarningsMany:p,expectToWarn:C,expectToWarnMany:b,expectWarningWillFire:F,FIXTURE_TAG:x,generateTestsFromFixtures:h,matchers:v,printAST:y,simpleClone:w,skipIf:function(e){for(var n,t=arguments.length,r=new Array(t>1?t-1:0),o=1;o<t;o++)r[o-1]=arguments[o];var a=r.length>0?r[0]:"N/A";console.warn('The test "'.concat(a,'" is being skipped in open source. TODO: T192916613')),"true"===e?(n=test).skip.apply(n,r):test.apply(void 0,r)},trackRetentionForEnvironment:W,unwrapContainer:j}},805:(e,n,t)=>{var r=(0,t(193).default)(t(680));function o(e,n){switch(typeof e){case"undefined":return"undefined";case"object":if(null===e)return"null";if(Array.isArray(e)){if(0===e.length)return"[]";var t,a="[\n",i=n+" ",s=(0,r.default)(e);try{for(s.s();!(t=s.n()).done;)a+=i+o(t.value,i)+",\n"}catch(e){s.e(e)}finally{s.f()}return a+(n+"]")}if("string"==typeof e.kind){for(var c="".concat(e.kind," {\n"),l=n+" ",u=0,p=Object.entries(e);u<p.length;u++){var f=p[u],g=f[0],d=f[1];"kind"!==g&&(c+="".concat(l).concat(g,": ").concat(o(d,l),",\n"))}return c+(n+"}")}if("function"==typeof e.toJSON)return o(e.toJSON(),n);for(var x="{\n",h=n+" ",v=0,y=Object.entries(e);v<y.length;v++){var w=y[v],W=w[0],E=w[1];x+="".concat(h).concat(JSON.stringify(W),": ").concat(o(E,h),",\n")}return x+(n+"}");case"string":case"number":case"boolean":return JSON.stringify(e,null,2).replace("\n","\n"+n);default:throw new Error("printAST doesn't handle values where "+"typeof value === '".concat(typeof e,"'."))}}e.exports=function(e){return o(e,"")}},85:e=>{e.exports=function e(n){if(Array.isArray(n))return n.map(e);if(null!=n&&"object"==typeof n){var t={};for(var r in n)t[r]=e(n[r]);return t}return n}},455:e=>{e.exports=function(e){var n=new Map,t=jest.fn((function(e){var t,r=null!==(t=n.get(e))&&void 0!==t?t:NaN;1===r?n.delete(e):n.set(e,r-1)}));return e.retain=jest.fn((function(e){var r,o=e.request.identifier,a=null!==(r=n.get(o))&&void 0!==r?r:0;n.set(o,a+1);var i=!1;return{dispose:function(){i||t(o),i=!0}}})),{release_DEPRECATED:t,isOperationRetained:function(e){var t,r=e.request.identifier;return(null!==(t=n.get(r))&&void 0!==t?t:0)>0}}}},791:(e,n,t)=>{var r=(0,t(489).createConsoleInterceptionSystem)("warning","expectToWarn",(function(e){jest.mock("fbjs/lib/warning",(function(){return jest.fn((function(n,t){for(var r=arguments.length,o=new Array(r>2?r-2:0),a=2;a<r;a++)o[a-2]=arguments[a];if(!n){var i=0,s=t.replace(/%s/g,(function(){return String(o[i++])}));e(s)}}))}))}));e.exports={disallowWarnings:function(){r.disallowMessages()},expectWarningWillFire:function(e,n){r.expectMessageWillFire(e,n)},expectToWarn:function(e,n){return r.expectMessage(e,n)},expectToWarnMany:function(e,n){return r.expectMessageMany(e,n)}}},680:e=>{e.exports=require("@babel/runtime/helpers/createForOfIteratorHelper")},195:e=>{e.exports=require("@babel/runtime/helpers/defineProperty")},193:e=>{e.exports=require("@babel/runtime/helpers/interopRequireDefault")},56:e=>{e.exports=require("@babel/runtime/helpers/objectSpread2")},759:e=>{e.exports=require("@babel/runtime/helpers/toConsumableArray")},520:e=>{e.exports=require("fbjs/lib/warning")},48:e=>{e.exports=require("fs")},315:e=>{e.exports=require("path")},268:e=>{e.exports=require("relay-runtime")},371:e=>{e.exports=require("relay-test-utils")}},n={},t=function t(r){var o=n[r];if(void 0!==o)return o.exports;var a=n[r]={exports:{}};return e[r](a,a.exports,t),a.exports}(310);module.exports.RelayTestUtilsInternal=t})();
|
@@ -1,9 +1,9 @@
|
|
1
1
|
/**
|
2
|
-
* Relay
|
2
|
+
* Relay v18.0.0
|
3
3
|
*
|
4
4
|
* Copyright (c) Meta Platforms, Inc. and affiliates.
|
5
5
|
*
|
6
6
|
* This source code is licensed under the MIT license found in the
|
7
7
|
* LICENSE file in the root directory of this source tree.
|
8
8
|
*/
|
9
|
-
(()=>{"use strict";var e={115:(e,n,
|
9
|
+
(()=>{"use strict";var e={115:(e,n,t)=>{e.exports={toBeDeeplyFrozen:function(e){return function e(n){if(expect(Object.isFrozen(n)).toBe(!0),Array.isArray(n))n.forEach((function(n){return e(n)}));else if("object"==typeof n&&null!==n)for(var t in n)e(n[t])}(e),{pass:!0}},toWarn:function(e,n){var r=this.isNot;function o(e){return e instanceof RegExp?e.toString():JSON.stringify(e)}function a(e){return"["+e.map(o).join(", ")+"]"}function i(e){return e.length?e.map((function(e){return a([!!e[0]].concat(e.slice(1)))})).join(", "):"[]"}var s=t(520);if(!s.mock)throw new Error("toWarn(): Requires `jest.mock('warning')`.");var c=s.mock.calls.length;e();var l=s.mock.calls.slice(c);return n?(Array.isArray(n)||(n=[n]),{pass:!!l.find((function(e){return e.length===n.length+1&&e.every((function(e,t){if(!t)return!e;var r=n[t-1];return r instanceof RegExp?r.test(e):e===r}))})),message:function(){return"Expected ".concat(r?"not ":"","to warn: ")+"".concat(a([!1].concat(n))," but ")+"`warning` received the following calls: "+"".concat(i(l),".")}}):{pass:!!l.filter((function(e){return!e[0]})).length,message:function(){return"Expected ".concat(r?"not ":"","to warn but ")+"`warning` received the following calls: "+"".concat(i(l),".")}}}}},815:(e,n,t)=>{var r=(0,t(489).createConsoleInterceptionSystem)("error","expectConsoleError",(function(e){jest.spyOn(console,"error").mockImplementation(e)}));e.exports={disallowConsoleErrors:function(){r.disallowMessages()},expectConsoleErrorWillFire:function(e,n){r.expectMessageWillFire(e,n)},expectConsoleError:function(e,n){return r.expectMessage(e,n)},expectConsoleErrorsMany:function(e,n){return r.expectMessageMany(e,n)}}},489:(e,n,t)=>{var r=(0,t(193).default)(t(759)),o=console.error;e.exports={createConsoleInterceptionSystem:function(e,n,t){var a=!1,i=[],s=[],c=[],l=e.charAt(0).toUpperCase()+e.slice(1),u=l+"s",p="disallow".concat(l,"s");function f(e){var n=i.findIndex((function(n){return e.startsWith(n)})),t=s.findIndex((function(n){return e.startsWith(n)}));if(c.length>0&&e.startsWith(c[0]))c.shift();else if(n>=0)i.splice(n,1);else{if(!(t>=0))throw o("Unexpected ".concat(l,": ")+e),new Error("".concat(l,": ")+e);s.splice(t,1)}}function g(t,o){if(c.length>0)throw new Error("Cannot nest ".concat(n,"() calls."));c.push.apply(c,(0,r.default)(t));var a=o();if(c.length>0){var i=c.toString();throw c.length=0,new Error("Expected ".concat(e," in callback: ").concat(i))}return a}return{disallowMessages:function(){if(a)throw new Error("".concat(p," should be called only once."));a=!0,t(f),afterEach((function(){if(s.length=0,c.length=0,i.length>0){var n=new Error("Some ".concat(i.length," expected ").concat(e,"s where not triggered:\n\n")+Array.from(i,(function(e){return" * ".concat(e)})).join("\n")+"\n");throw i.length=0,n}}))},expectMessageWillFire:function(e,n){if(!a)throw new Error("".concat(p," needs to be called before expect").concat(u,"WillFire"));for(var t=!0===(null==n?void 0:n.optional),r=0;r<(null!==(o=null==n?void 0:n.count)&&void 0!==o?o:1);r++){var o;(t?s:i).push(e)}},expectMessage:function(e,n){return g([e],n)},expectMessageMany:g}}}},15:(e,n,t)=>{var r=(0,t(489).createConsoleInterceptionSystem)("warning","expectConsoleWarning",(function(e){jest.spyOn(console,"warn").mockImplementation(e)}));e.exports={disallowConsoleWarnings:function(){r.disallowMessages()},expectConsoleWarningWillFire:function(e,n){r.expectMessageWillFire(e,n)},expectConsoleWarning:function(e,n){return r.expectMessage(e,n)},expectConsoleWarningsMany:function(e,n){return r.expectMessageMany(e,n)}}},377:(e,n,t)=>{var r=(0,t(193).default)(t(56));e.exports=function(e,n,o){describe.each(e)("".concat(n," - Feature flags: %o"),(function(e){var n;beforeEach((function(){var o=t(268).RelayFeatureFlags;n=(0,r.default)({},o),Object.assign(o,e)})),afterEach((function(){var e=t(268).RelayFeatureFlags;Object.assign(e,n)})),o()}))}},436:(e,n,t)=>{var r=(0,t(193).default)(t(195)),o=t(861),a=t(48),i=t(315),s=Symbol.for("FIXTURE_TAG");expect.addSnapshotSerializer({serialize:function(e){return Object.keys(e).map((function(n){return"~~~~~~~~~~ ".concat(n.toUpperCase()," ~~~~~~~~~~\n").concat(e[n])})).join("\n")},test:function(e){return e&&!0===e[s]}}),e.exports={generateTestsFromFixtures:function(e,n){var t=a.readdirSync(e);test("has fixtures in ".concat(e),(function(){expect(t.length>0).toBe(!0)}));var c=t.filter((function(e){return e.startsWith("only.")}));c.length&&(test.skip.each(t.filter((function(e){return!e.startsWith("only.")})))("matches expected output: %s",(function(){})),t=c),test.each(t)("matches expected output: %s",(function(t){var c,l=a.readFileSync(i.join(e,t),"utf8"),u=o(l,n,t);expect((c={},(0,r.default)(c,s,!0),(0,r.default)(c,"input",l),(0,r.default)(c,"output",u),c)).toMatchSnapshot()}))},FIXTURE_TAG:s}},861:e=>{e.exports=function(e,n,t){if(/^# *expected-to-throw/.test(e)||/\.error\.\w+$/.test(t)){var r;try{r=n(e)}catch(e){return"THROWN EXCEPTION:\n\n".concat(e.toString())}throw new Error("Expected test file '".concat(t,"' to throw, but it passed:\n").concat(r))}return n(e)}},310:(e,n,t)=>{var r=t(815),o=r.disallowConsoleErrors,a=r.expectConsoleError,i=r.expectConsoleErrorsMany,s=r.expectConsoleErrorWillFire,c=t(15),l=c.disallowConsoleWarnings,u=c.expectConsoleWarning,p=c.expectConsoleWarningsMany,f=c.expectConsoleWarningWillFire,g=t(377),d=t(436),x=d.FIXTURE_TAG,h=d.generateTestsFromFixtures,v=t(115),y=t(805),w=t(85),W=t(455),E=t(791),m=E.disallowWarnings,C=E.expectToWarn,b=E.expectToWarnMany,F=E.expectWarningWillFire,M=t(371),T=M.createMockEnvironment,j=M.unwrapContainer;e.exports={cannotReadPropertyOfUndefined__DEPRECATED:function(e){var n=process.version.match(/^v(\d+)\./),t=null==n?null:parseInt(n[1],10);return null==t||t<16?"Cannot read property '".concat(e,"' of undefined"):"Cannot read properties of undefined (reading '".concat(e,"')")},createMockEnvironment:T,describeWithFeatureFlags:g,disallowConsoleErrors:o,disallowConsoleWarnings:l,disallowWarnings:m,expectConsoleError:a,expectConsoleErrorsMany:i,expectConsoleErrorWillFire:s,expectConsoleWarningWillFire:f,expectConsoleWarning:u,expectConsoleWarningsMany:p,expectToWarn:C,expectToWarnMany:b,expectWarningWillFire:F,FIXTURE_TAG:x,generateTestsFromFixtures:h,matchers:v,printAST:y,simpleClone:w,skipIf:function(e){for(var n,t=arguments.length,r=new Array(t>1?t-1:0),o=1;o<t;o++)r[o-1]=arguments[o];var a=r.length>0?r[0]:"N/A";console.warn('The test "'.concat(a,'" is being skipped in open source. TODO: T192916613')),"true"===e?(n=test).skip.apply(n,r):test.apply(void 0,r)},trackRetentionForEnvironment:W,unwrapContainer:j}},805:(e,n,t)=>{var r=(0,t(193).default)(t(680));function o(e,n){switch(typeof e){case"undefined":return"undefined";case"object":if(null===e)return"null";if(Array.isArray(e)){if(0===e.length)return"[]";var t,a="[\n",i=n+" ",s=(0,r.default)(e);try{for(s.s();!(t=s.n()).done;)a+=i+o(t.value,i)+",\n"}catch(e){s.e(e)}finally{s.f()}return a+(n+"]")}if("string"==typeof e.kind){for(var c="".concat(e.kind," {\n"),l=n+" ",u=0,p=Object.entries(e);u<p.length;u++){var f=p[u],g=f[0],d=f[1];"kind"!==g&&(c+="".concat(l).concat(g,": ").concat(o(d,l),",\n"))}return c+(n+"}")}if("function"==typeof e.toJSON)return o(e.toJSON(),n);for(var x="{\n",h=n+" ",v=0,y=Object.entries(e);v<y.length;v++){var w=y[v],W=w[0],E=w[1];x+="".concat(h).concat(JSON.stringify(W),": ").concat(o(E,h),",\n")}return x+(n+"}");case"string":case"number":case"boolean":return JSON.stringify(e,null,2).replace("\n","\n"+n);default:throw new Error("printAST doesn't handle values where "+"typeof value === '".concat(typeof e,"'."))}}e.exports=function(e){return o(e,"")}},85:e=>{e.exports=function e(n){if(Array.isArray(n))return n.map(e);if(null!=n&&"object"==typeof n){var t={};for(var r in n)t[r]=e(n[r]);return t}return n}},455:e=>{e.exports=function(e){var n=new Map,t=jest.fn((function(e){var t,r=null!==(t=n.get(e))&&void 0!==t?t:NaN;1===r?n.delete(e):n.set(e,r-1)}));return e.retain=jest.fn((function(e){var r,o=e.request.identifier,a=null!==(r=n.get(o))&&void 0!==r?r:0;n.set(o,a+1);var i=!1;return{dispose:function(){i||t(o),i=!0}}})),{release_DEPRECATED:t,isOperationRetained:function(e){var t,r=e.request.identifier;return(null!==(t=n.get(r))&&void 0!==t?t:0)>0}}}},791:(e,n,t)=>{var r=(0,t(489).createConsoleInterceptionSystem)("warning","expectToWarn",(function(e){jest.mock("fbjs/lib/warning",(function(){return jest.fn((function(n,t){for(var r=arguments.length,o=new Array(r>2?r-2:0),a=2;a<r;a++)o[a-2]=arguments[a];if(!n){var i=0,s=t.replace(/%s/g,(function(){return String(o[i++])}));e(s)}}))}))}));e.exports={disallowWarnings:function(){r.disallowMessages()},expectWarningWillFire:function(e,n){r.expectMessageWillFire(e,n)},expectToWarn:function(e,n){return r.expectMessage(e,n)},expectToWarnMany:function(e,n){return r.expectMessageMany(e,n)}}},680:e=>{e.exports=require("@babel/runtime/helpers/createForOfIteratorHelper")},195:e=>{e.exports=require("@babel/runtime/helpers/defineProperty")},193:e=>{e.exports=require("@babel/runtime/helpers/interopRequireDefault")},56:e=>{e.exports=require("@babel/runtime/helpers/objectSpread2")},759:e=>{e.exports=require("@babel/runtime/helpers/toConsumableArray")},520:e=>{e.exports=require("fbjs/lib/warning")},48:e=>{e.exports=require("fs")},315:e=>{e.exports=require("path")},268:e=>{e.exports=require("relay-runtime")},371:e=>{e.exports=require("relay-test-utils")}},n={},t=function t(r){var o=n[r];if(void 0!==o)return o.exports;var a=n[r]={exports:{}};return e[r](a,a.exports,t),a.exports}(310);module.exports.RelayTestUtilsInternal=t})();
|