relay-test-utils-internal 0.0.0-main-e8cbdbdf → 0.0.0-main-d84cc395

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.
@@ -15,6 +15,7 @@
15
15
 
16
16
  export type WillFireOptions = {
17
17
  count?: number,
18
+ optional?: boolean,
18
19
  };
19
20
 
20
21
  type API = $ReadOnly<{|
@@ -33,6 +34,7 @@ function createConsoleInterceptionSystem(
33
34
  ): API {
34
35
  let installed = false;
35
36
  const expectedMessages: Array<string> = [];
37
+ const optionalMessages: Array<string> = [];
36
38
  const contextualExpectedMessage: Array<string> = [];
37
39
 
38
40
  const typenameCap = typename.charAt(0).toUpperCase() + typename.slice(1);
@@ -43,6 +45,9 @@ function createConsoleInterceptionSystem(
43
45
  const index = expectedMessages.findIndex(expected =>
44
46
  message.startsWith(expected),
45
47
  );
48
+ const optionalIndex = optionalMessages.findIndex(expected =>
49
+ message.startsWith(expected),
50
+ );
46
51
  if (
47
52
  contextualExpectedMessage.length > 0 &&
48
53
  message.startsWith(contextualExpectedMessage[0])
@@ -50,6 +55,8 @@ function createConsoleInterceptionSystem(
50
55
  contextualExpectedMessage.shift();
51
56
  } else if (index >= 0) {
52
57
  expectedMessages.splice(index, 1);
58
+ } else if (optionalIndex >= 0) {
59
+ optionalMessages.splice(optionalIndex, 1);
53
60
  } else {
54
61
  // log to console in case the error gets swallowed somewhere
55
62
  originalConsoleError(`Unexpected ${typenameCap}: ` + message);
@@ -65,6 +72,7 @@ function createConsoleInterceptionSystem(
65
72
  setUpMock(handleMessage);
66
73
 
67
74
  afterEach(() => {
75
+ optionalMessages.length = 0;
68
76
  contextualExpectedMessage.length = 0;
69
77
  if (expectedMessages.length > 0) {
70
78
  const error = new Error(
@@ -89,8 +97,9 @@ function createConsoleInterceptionSystem(
89
97
  `${installerName} needs to be called before expect${typenameCapPlural}WillFire`,
90
98
  );
91
99
  }
100
+ const optional = options?.optional === true; // avoid "sketchy null check"
92
101
  for (let i = 0; i < (options?.count ?? 1); i++) {
93
- expectedMessages.push(message);
102
+ (optional ? optionalMessages : expectedMessages).push(message);
94
103
  }
95
104
  }
96
105
 
@@ -0,0 +1,70 @@
1
+ /**
2
+ * Copyright (c) Meta Platforms, Inc. and affiliates.
3
+ *
4
+ * This source code is licensed under the MIT license found in the
5
+ * LICENSE file in the root directory of this source tree.
6
+ *
7
+ * @emails oncall+relay
8
+ * @flow strict-local
9
+ * @format
10
+ */
11
+
12
+ 'use strict';
13
+
14
+ /* global jest */
15
+
16
+ import type {WillFireOptions} from './consoleErrorsAndWarnings';
17
+
18
+ const {createConsoleInterceptionSystem} = require('./consoleErrorsAndWarnings');
19
+
20
+ const consoleWarningsSystem = createConsoleInterceptionSystem(
21
+ 'warning',
22
+ 'expectConsoleWarning',
23
+ impl => {
24
+ jest.spyOn(console, 'warn').mockImplementation(impl);
25
+ },
26
+ );
27
+
28
+ /**
29
+ * Mocks console.warn so that warnings printed to the console are instead thrown.
30
+ * Any expected warnings need to be explicitly expected with `expectConsoleWarningWillFire(message)`.
31
+ *
32
+ * NOTE: This should be called on top of a test file. The test should NOT
33
+ * use `jest.resetModules()` or manually mock `console`.
34
+ */
35
+ function disallowConsoleWarnings(): void {
36
+ consoleWarningsSystem.disallowMessages();
37
+ }
38
+
39
+ /**
40
+ * Expect a warning with the given message. If the message isn't fired in the
41
+ * current test, the test will fail.
42
+ */
43
+ function expectConsoleWarningWillFire(
44
+ message: string,
45
+ options?: WillFireOptions,
46
+ ): void {
47
+ consoleWarningsSystem.expectMessageWillFire(message, options);
48
+ }
49
+
50
+ /**
51
+ * Expect the callback `fn` to print a warning with the message, and otherwise fail.
52
+ */
53
+ function expectConsoleWarning<T>(message: string, fn: () => T): T {
54
+ return consoleWarningsSystem.expectMessage(message, fn);
55
+ }
56
+
57
+ /**
58
+ * Expect the callback `fn` to trigger all console warnings (in sequence),
59
+ * and otherwise fail.
60
+ */
61
+ function expectConsoleWarningsMany<T>(messages: Array<string>, fn: () => T): T {
62
+ return consoleWarningsSystem.expectMessageMany(messages, fn);
63
+ }
64
+
65
+ module.exports = {
66
+ disallowConsoleWarnings,
67
+ expectConsoleWarningWillFire,
68
+ expectConsoleWarning,
69
+ expectConsoleWarningsMany,
70
+ };
package/index.js CHANGED
@@ -1,5 +1,5 @@
1
1
  /**
2
- * Relay v0.0.0-main-e8cbdbdf
2
+ * Relay v0.0.0-main-d84cc395
3
3
  *
4
4
  * Copyright (c) Meta Platforms, Inc. and affiliates.
5
5
  *
package/index.js.flow CHANGED
@@ -18,6 +18,12 @@ const {
18
18
  expectConsoleErrorsMany,
19
19
  expectConsoleErrorWillFire,
20
20
  } = require('./consoleError');
21
+ const {
22
+ disallowConsoleWarnings,
23
+ expectConsoleWarning,
24
+ expectConsoleWarningsMany,
25
+ expectConsoleWarningWillFire,
26
+ } = require('./consoleWarning');
21
27
  const describeWithFeatureFlags = require('./describeWithFeatureFlags');
22
28
  const {
23
29
  FIXTURE_TAG,
@@ -57,10 +63,14 @@ module.exports = {
57
63
  createMockEnvironment,
58
64
  describeWithFeatureFlags,
59
65
  disallowConsoleErrors,
66
+ disallowConsoleWarnings,
60
67
  disallowWarnings,
61
68
  expectConsoleError,
62
69
  expectConsoleErrorsMany,
63
70
  expectConsoleErrorWillFire,
71
+ expectConsoleWarningWillFire,
72
+ expectConsoleWarning,
73
+ expectConsoleWarningsMany,
64
74
  expectToWarn,
65
75
  expectToWarnMany,
66
76
  expectWarningWillFire,
@@ -20,6 +20,7 @@ var originalConsoleError = console.error;
20
20
  function createConsoleInterceptionSystem(typename, expectFunctionName, setUpMock) {
21
21
  var installed = false;
22
22
  var expectedMessages = [];
23
+ var optionalMessages = [];
23
24
  var contextualExpectedMessage = [];
24
25
  var typenameCap = typename.charAt(0).toUpperCase() + typename.slice(1);
25
26
  var typenameCapPlural = typenameCap + 's';
@@ -29,11 +30,16 @@ function createConsoleInterceptionSystem(typename, expectFunctionName, setUpMock
29
30
  var index = expectedMessages.findIndex(function (expected) {
30
31
  return message.startsWith(expected);
31
32
  });
33
+ var optionalIndex = optionalMessages.findIndex(function (expected) {
34
+ return message.startsWith(expected);
35
+ });
32
36
 
33
37
  if (contextualExpectedMessage.length > 0 && message.startsWith(contextualExpectedMessage[0])) {
34
38
  contextualExpectedMessage.shift();
35
39
  } else if (index >= 0) {
36
40
  expectedMessages.splice(index, 1);
41
+ } else if (optionalIndex >= 0) {
42
+ optionalMessages.splice(optionalIndex, 1);
37
43
  } else {
38
44
  // log to console in case the error gets swallowed somewhere
39
45
  originalConsoleError("Unexpected ".concat(typenameCap, ": ") + message);
@@ -49,6 +55,7 @@ function createConsoleInterceptionSystem(typename, expectFunctionName, setUpMock
49
55
  installed = true;
50
56
  setUpMock(handleMessage);
51
57
  afterEach(function () {
58
+ optionalMessages.length = 0;
52
59
  contextualExpectedMessage.length = 0;
53
60
 
54
61
  if (expectedMessages.length > 0) {
@@ -66,10 +73,12 @@ function createConsoleInterceptionSystem(typename, expectFunctionName, setUpMock
66
73
  throw new Error("".concat(installerName, " needs to be called before expect").concat(typenameCapPlural, "WillFire"));
67
74
  }
68
75
 
76
+ var optional = (options === null || options === void 0 ? void 0 : options.optional) === true; // avoid "sketchy null check"
77
+
69
78
  for (var i = 0; i < ((_options$count = options === null || options === void 0 ? void 0 : options.count) !== null && _options$count !== void 0 ? _options$count : 1); i++) {
70
79
  var _options$count;
71
80
 
72
- expectedMessages.push(message);
81
+ (optional ? optionalMessages : expectedMessages).push(message);
73
82
  }
74
83
  }
75
84
 
@@ -0,0 +1,63 @@
1
+ /**
2
+ * Copyright (c) Meta Platforms, Inc. and affiliates.
3
+ *
4
+ * This source code is licensed under the MIT license found in the
5
+ * LICENSE file in the root directory of this source tree.
6
+ *
7
+ * @emails oncall+relay
8
+ *
9
+ * @format
10
+ */
11
+ 'use strict';
12
+ /* global jest */
13
+
14
+ var _require = require('./consoleErrorsAndWarnings'),
15
+ createConsoleInterceptionSystem = _require.createConsoleInterceptionSystem;
16
+
17
+ var consoleWarningsSystem = createConsoleInterceptionSystem('warning', 'expectConsoleWarning', function (impl) {
18
+ jest.spyOn(console, 'warn').mockImplementation(impl);
19
+ });
20
+ /**
21
+ * Mocks console.warn so that warnings printed to the console are instead thrown.
22
+ * Any expected warnings need to be explicitly expected with `expectConsoleWarningWillFire(message)`.
23
+ *
24
+ * NOTE: This should be called on top of a test file. The test should NOT
25
+ * use `jest.resetModules()` or manually mock `console`.
26
+ */
27
+
28
+ function disallowConsoleWarnings() {
29
+ consoleWarningsSystem.disallowMessages();
30
+ }
31
+ /**
32
+ * Expect a warning with the given message. If the message isn't fired in the
33
+ * current test, the test will fail.
34
+ */
35
+
36
+
37
+ function expectConsoleWarningWillFire(message, options) {
38
+ consoleWarningsSystem.expectMessageWillFire(message, options);
39
+ }
40
+ /**
41
+ * Expect the callback `fn` to print a warning with the message, and otherwise fail.
42
+ */
43
+
44
+
45
+ function expectConsoleWarning(message, fn) {
46
+ return consoleWarningsSystem.expectMessage(message, fn);
47
+ }
48
+ /**
49
+ * Expect the callback `fn` to trigger all console warnings (in sequence),
50
+ * and otherwise fail.
51
+ */
52
+
53
+
54
+ function expectConsoleWarningsMany(messages, fn) {
55
+ return consoleWarningsSystem.expectMessageMany(messages, fn);
56
+ }
57
+
58
+ module.exports = {
59
+ disallowConsoleWarnings: disallowConsoleWarnings,
60
+ expectConsoleWarningWillFire: expectConsoleWarningWillFire,
61
+ expectConsoleWarning: expectConsoleWarning,
62
+ expectConsoleWarningsMany: expectConsoleWarningsMany
63
+ };
package/lib/index.js CHANGED
@@ -16,11 +16,17 @@ var _require = require('./consoleError'),
16
16
  expectConsoleErrorsMany = _require.expectConsoleErrorsMany,
17
17
  expectConsoleErrorWillFire = _require.expectConsoleErrorWillFire;
18
18
 
19
+ var _require2 = require('./consoleWarning'),
20
+ disallowConsoleWarnings = _require2.disallowConsoleWarnings,
21
+ expectConsoleWarning = _require2.expectConsoleWarning,
22
+ expectConsoleWarningsMany = _require2.expectConsoleWarningsMany,
23
+ expectConsoleWarningWillFire = _require2.expectConsoleWarningWillFire;
24
+
19
25
  var describeWithFeatureFlags = require('./describeWithFeatureFlags');
20
26
 
21
- var _require2 = require('./generateTestsFromFixtures'),
22
- FIXTURE_TAG = _require2.FIXTURE_TAG,
23
- generateTestsFromFixtures = _require2.generateTestsFromFixtures;
27
+ var _require3 = require('./generateTestsFromFixtures'),
28
+ FIXTURE_TAG = _require3.FIXTURE_TAG,
29
+ generateTestsFromFixtures = _require3.generateTestsFromFixtures;
24
30
 
25
31
  var Matchers = require('./Matchers');
26
32
 
@@ -28,15 +34,15 @@ var printAST = require('./printAST');
28
34
 
29
35
  var simpleClone = require('./simpleClone');
30
36
 
31
- var _require3 = require('./warnings'),
32
- disallowWarnings = _require3.disallowWarnings,
33
- expectToWarn = _require3.expectToWarn,
34
- expectToWarnMany = _require3.expectToWarnMany,
35
- expectWarningWillFire = _require3.expectWarningWillFire;
37
+ var _require4 = require('./warnings'),
38
+ disallowWarnings = _require4.disallowWarnings,
39
+ expectToWarn = _require4.expectToWarn,
40
+ expectToWarnMany = _require4.expectToWarnMany,
41
+ expectWarningWillFire = _require4.expectWarningWillFire;
36
42
 
37
- var _require4 = require('relay-test-utils'),
38
- createMockEnvironment = _require4.createMockEnvironment,
39
- unwrapContainer = _require4.unwrapContainer; // Apparently, in node v16 (because now they are using V8 V9.something)
43
+ var _require5 = require('relay-test-utils'),
44
+ createMockEnvironment = _require5.createMockEnvironment,
45
+ unwrapContainer = _require5.unwrapContainer; // Apparently, in node v16 (because now they are using V8 V9.something)
40
46
  // the content of the TypeError has changed, and now some of our tests
41
47
  // stated to fail.
42
48
  // This is a temporary work-around to make test pass, but we need to
@@ -60,10 +66,14 @@ module.exports = {
60
66
  createMockEnvironment: createMockEnvironment,
61
67
  describeWithFeatureFlags: describeWithFeatureFlags,
62
68
  disallowConsoleErrors: disallowConsoleErrors,
69
+ disallowConsoleWarnings: disallowConsoleWarnings,
63
70
  disallowWarnings: disallowWarnings,
64
71
  expectConsoleError: expectConsoleError,
65
72
  expectConsoleErrorsMany: expectConsoleErrorsMany,
66
73
  expectConsoleErrorWillFire: expectConsoleErrorWillFire,
74
+ expectConsoleWarningWillFire: expectConsoleWarningWillFire,
75
+ expectConsoleWarning: expectConsoleWarning,
76
+ expectConsoleWarningsMany: expectConsoleWarningsMany,
67
77
  expectToWarn: expectToWarn,
68
78
  expectToWarnMany: expectToWarnMany,
69
79
  expectWarningWillFire: expectWarningWillFire,
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": "0.0.0-main-e8cbdbdf",
4
+ "version": "0.0.0-main-d84cc395",
5
5
  "keywords": [
6
6
  "graphql",
7
7
  "relay"
@@ -17,7 +17,7 @@
17
17
  "dependencies": {
18
18
  "@babel/runtime": "^7.0.0",
19
19
  "fbjs": "^3.0.2",
20
- "relay-runtime": "0.0.0-main-e8cbdbdf"
20
+ "relay-runtime": "0.0.0-main-d84cc395"
21
21
  },
22
22
  "directories": {
23
23
  "": "./"
@@ -1,4 +1,4 @@
1
1
  /**
2
- * Relay v0.0.0-main-e8cbdbdf
2
+ * Relay v0.0.0-main-d84cc395
3
3
  */
4
- module.exports=function(e){var t={};function n(r){if(t[r])return t[r].exports;var o=t[r]={i:r,l:!1,exports:{}};return e[r].call(o.exports,o,o.exports,n),o.l=!0,o.exports}return n.m=e,n.c=t,n.d=function(e,t,r){n.o(e,t)||Object.defineProperty(e,t,{enumerable:!0,get:r})},n.r=function(e){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})},n.t=function(e,t){if(1&t&&(e=n(e)),8&t)return e;if(4&t&&"object"==typeof e&&e&&e.__esModule)return e;var r=Object.create(null);if(n.r(r),Object.defineProperty(r,"default",{enumerable:!0,value:e}),2&t&&"string"!=typeof e)for(var o in e)n.d(r,o,function(t){return e[t]}.bind(null,o));return r},n.n=function(e){var t=e&&e.__esModule?function(){return e.default}:function(){return e};return n.d(t,"a",t),t},n.o=function(e,t){return Object.prototype.hasOwnProperty.call(e,t)},n.p="",n(n.s=3)}([function(e,t){e.exports=require("@babel/runtime/helpers/interopRequireDefault")},function(e,t,n){"use strict";var r=n(0)(n(5)),o=console.error;e.exports={createConsoleInterceptionSystem:function(e,t,n){var c=!1,i=[],a=[],s=e.charAt(0).toUpperCase()+e.slice(1),u=s+"s",l="disallow".concat(s,"s");function f(e){var t=i.findIndex((function(t){return e.startsWith(t)}));if(a.length>0&&e.startsWith(a[0]))a.shift();else{if(!(t>=0))throw o("Unexpected ".concat(s,": ")+e),new Error("".concat(s,": ")+e);i.splice(t,1)}}function p(n,o){if(a.length>0)throw new Error("Cannot nest ".concat(t,"() calls."));a.push.apply(a,(0,r.default)(n));var c=o();if(a.length>0){var i=a.toString();throw a.length=0,new Error("Expected ".concat(e," in callback: ").concat(i))}return c}return{disallowMessages:function(){if(c)throw new Error("".concat(l," should be called only once."));c=!0,n(f),afterEach((function(){if(a.length=0,i.length>0){var t=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,t}}))},expectMessageWillFire:function(e,t){if(!c)throw new Error("".concat(l," needs to be called before expect").concat(u,"WillFire"));for(var n=0;n<(null!==(r=null==t?void 0:t.count)&&void 0!==r?r:1);n++){var r;i.push(e)}},expectMessage:function(e,t){return p([e],t)},expectMessageMany:p}}}},function(e,t){e.exports=require("relay-runtime")},function(e,t,n){"use strict";var r=n(4),o=r.disallowConsoleErrors,c=r.expectConsoleError,i=r.expectConsoleErrorsMany,a=r.expectConsoleErrorWillFire,s=n(6),u=n(8),l=u.FIXTURE_TAG,f=u.generateTestsFromFixtures,p=n(13),d=n(15),g=n(17),x=n(18),h=x.disallowWarnings,y=x.expectToWarn,v=x.expectToWarnMany,b=x.expectWarningWillFire,w=n(19),m=w.createMockEnvironment,E=w.unwrapContainer;e.exports={cannotReadPropertyOfUndefined__DEPRECATED:function(e){return process.version.match(/^v16\.(.+)$/)?"Cannot read properties of undefined (reading '".concat(e,"')"):"Cannot read property '".concat(e,"' of undefined")},createMockEnvironment:m,describeWithFeatureFlags:s,disallowConsoleErrors:o,disallowWarnings:h,expectConsoleError:c,expectConsoleErrorsMany:i,expectConsoleErrorWillFire:a,expectToWarn:y,expectToWarnMany:v,expectWarningWillFire:b,FIXTURE_TAG:l,generateTestsFromFixtures:f,matchers:p,printAST:d,simpleClone:g,unwrapContainer:E}},function(e,t,n){"use strict";var r=(0,n(1).createConsoleInterceptionSystem)("error","expectConsoleError",(function(e){jest.spyOn(console,"error").mockImplementation(e)}));e.exports={disallowConsoleErrors:function(){r.disallowMessages()},expectConsoleErrorWillFire:function(e,t){r.expectMessageWillFire(e,t)},expectConsoleError:function(e,t){return r.expectMessage(e,t)},expectConsoleErrorsMany:function(e,t){return r.expectMessageMany(e,t)}}},function(e,t){e.exports=require("@babel/runtime/helpers/toConsumableArray")},function(e,t,n){"use strict";var r=n(0)(n(7));e.exports=function(e,t,o){describe.each(e)("".concat(t," - Feature flags: %o"),(function(e){var t;beforeEach((function(){var o=n(2).RelayFeatureFlags;t=(0,r.default)({},o),Object.assign(o,e)})),afterEach((function(){var e=n(2).RelayFeatureFlags;Object.assign(e,t)})),o()}))}},function(e,t){e.exports=require("@babel/runtime/helpers/objectSpread2")},function(e,t,n){"use strict";var r=n(0)(n(9)),o=n(10),c=n(11),i=n(12),a=Symbol.for("FIXTURE_TAG");expect.addSnapshotSerializer({print:function(e){return Object.keys(e).map((function(t){return"~~~~~~~~~~ ".concat(t.toUpperCase()," ~~~~~~~~~~\n").concat(e[t])})).join("\n")},test:function(e){return e&&!0===e[a]}}),e.exports={generateTestsFromFixtures:function(e,t){var n=c.readdirSync(e);test("has fixtures in ".concat(e),(function(){expect(n.length>0).toBe(!0)}));var s=n.filter((function(e){return e.startsWith("only.")}));s.length&&(test.skip.each(n.filter((function(e){return!e.startsWith("only.")})))("matches expected output: %s",(function(){})),n=s),test.each(n)("matches expected output: %s",(function(n){var s,u=c.readFileSync(i.join(e,n),"utf8"),l=o(u,t,n);expect((s={},(0,r.default)(s,a,!0),(0,r.default)(s,"input",u),(0,r.default)(s,"output",l),s)).toMatchSnapshot()}))},FIXTURE_TAG:a}},function(e,t){e.exports=require("@babel/runtime/helpers/defineProperty")},function(e,t,n){"use strict";e.exports=function(e,t,n){if(/^# *expected-to-throw/.test(e)||/\.error\.\w+$/.test(n)){var r;try{r=t(e)}catch(e){return"THROWN EXCEPTION:\n\n".concat(e.toString())}throw new Error("Expected test file '".concat(n,"' to throw, but it passed:\n").concat(r))}return t(e)}},function(e,t){e.exports=require("fs")},function(e,t){e.exports=require("path")},function(e,t,n){"use strict";e.exports={toBeDeeplyFrozen:function(e){return function e(t){if(expect(Object.isFrozen(t)).toBe(!0),Array.isArray(t))t.forEach((function(t){return e(t)}));else if("object"==typeof t&&null!==t)for(var n in t)e(t[n])}(e),{pass:!0}},toWarn:function(e,t){var r=this.isNot;function o(e){return e instanceof RegExp?e.toString():JSON.stringify(e)}function c(e){return"["+e.map(o).join(", ")+"]"}function i(e){return e.length?e.map((function(e){return c([!!e[0]].concat(e.slice(1)))})).join(", "):"[]"}var a=n(14);if(!a.mock)throw new Error("toWarn(): Requires `jest.mock('warning')`.");var s=a.mock.calls.length;e();var u=a.mock.calls.slice(s);return t?(Array.isArray(t)||(t=[t]),{pass:!!u.find((function(e){return e.length===t.length+1&&e.every((function(e,n){if(!n)return!e;var r=t[n-1];return r instanceof RegExp?r.test(e):e===r}))})),message:function(){return"Expected ".concat(r?"not ":"","to warn: ")+"".concat(c([!1].concat(t))," but ")+"`warning` received the following calls: "+"".concat(i(u),".")}}):{pass:!!u.filter((function(e){return!e[0]})).length,message:function(){return"Expected ".concat(r?"not ":"","to warn but ")+"`warning` received the following calls: "+"".concat(i(u),".")}}}}},function(e,t){e.exports=require("fbjs/lib/warning")},function(e,t,n){"use strict";var r=n(0)(n(16));e.exports=function(e){return function e(t,n){switch(typeof t){case"undefined":return"undefined";case"object":if(null===t)return"null";if(Array.isArray(t)){if(0===t.length)return"[]";var o,c="[\n",i=n+" ",a=(0,r.default)(t);try{for(a.s();!(o=a.n()).done;){var s=o.value;c+=i+e(s,i)+",\n"}}catch(e){a.e(e)}finally{a.f()}return c+=n+"]"}if("string"==typeof t.kind){for(var u="".concat(t.kind," {\n"),l=n+" ",f=0,p=Object.entries(t);f<p.length;f++){var d=p[f],g=d[0],x=d[1];"kind"!==g&&(u+="".concat(l).concat(g,": ").concat(e(x,l),",\n"))}return u+=n+"}"}if("function"==typeof t.toJSON)return e(t.toJSON(),n);for(var h="{\n",y=n+" ",v=0,b=Object.entries(t);v<b.length;v++){var w=b[v],m=w[0],E=w[1];h+="".concat(y).concat(JSON.stringify(m),": ").concat(e(E,y),",\n")}return h+=n+"}";case"string":case"number":case"boolean":return JSON.stringify(t,null,2).replace("\n","\n"+n);default:throw new Error("printAST doesn't handle values where "+"typeof value === '".concat(typeof t,"'."))}}(e,"")}},function(e,t){e.exports=require("@babel/runtime/helpers/createForOfIteratorHelper")},function(e,t,n){"use strict";e.exports=function e(t){if(Array.isArray(t))return t.map(e);if(null!=t&&"object"==typeof t){var n={};for(var r in t)n[r]=e(t[r]);return n}return t}},function(e,t,n){"use strict";var r=(0,n(1).createConsoleInterceptionSystem)("warning","expectToWarn",(function(e){jest.mock("fbjs/lib/warning",(function(){return jest.fn((function(t,n){for(var r=arguments.length,o=new Array(r>2?r-2:0),c=2;c<r;c++)o[c-2]=arguments[c];if(!t){var i=0,a=n.replace(/%s/g,(function(){return String(o[i++])}));e(a)}}))}))}));e.exports={disallowWarnings:function(){r.disallowMessages()},expectWarningWillFire:function(e,t){r.expectMessageWillFire(e,t)},expectToWarn:function(e,t){return r.expectMessage(e,t)},expectToWarnMany:function(e,t){return r.expectMessageMany(e,t)}}},function(e,t){e.exports=require("relay-test-utils")}]);
4
+ module.exports=function(e){var n={};function t(r){if(n[r])return n[r].exports;var o=n[r]={i:r,l:!1,exports:{}};return e[r].call(o.exports,o,o.exports,t),o.l=!0,o.exports}return t.m=e,t.c=n,t.d=function(e,n,r){t.o(e,n)||Object.defineProperty(e,n,{enumerable:!0,get:r})},t.r=function(e){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})},t.t=function(e,n){if(1&n&&(e=t(e)),8&n)return e;if(4&n&&"object"==typeof e&&e&&e.__esModule)return e;var r=Object.create(null);if(t.r(r),Object.defineProperty(r,"default",{enumerable:!0,value:e}),2&n&&"string"!=typeof e)for(var o in e)t.d(r,o,function(n){return e[n]}.bind(null,o));return r},t.n=function(e){var n=e&&e.__esModule?function(){return e.default}:function(){return e};return t.d(n,"a",n),n},t.o=function(e,n){return Object.prototype.hasOwnProperty.call(e,n)},t.p="",t(t.s=3)}([function(e,n){e.exports=require("@babel/runtime/helpers/interopRequireDefault")},function(e,n,t){"use strict";var r=t(0)(t(5)),o=console.error;e.exports={createConsoleInterceptionSystem:function(e,n,t){var i=!1,c=[],a=[],s=[],u=e.charAt(0).toUpperCase()+e.slice(1),l=u+"s",f="disallow".concat(u,"s");function p(e){var n=c.findIndex((function(n){return e.startsWith(n)})),t=a.findIndex((function(n){return e.startsWith(n)}));if(s.length>0&&e.startsWith(s[0]))s.shift();else if(n>=0)c.splice(n,1);else{if(!(t>=0))throw o("Unexpected ".concat(u,": ")+e),new Error("".concat(u,": ")+e);a.splice(t,1)}}function g(t,o){if(s.length>0)throw new Error("Cannot nest ".concat(n,"() calls."));s.push.apply(s,(0,r.default)(t));var i=o();if(s.length>0){var c=s.toString();throw s.length=0,new Error("Expected ".concat(e," in callback: ").concat(c))}return i}return{disallowMessages:function(){if(i)throw new Error("".concat(f," should be called only once."));i=!0,t(p),afterEach((function(){if(a.length=0,s.length=0,c.length>0){var n=new Error("Some ".concat(c.length," expected ").concat(e,"s where not triggered:\n\n")+Array.from(c,(function(e){return" * ".concat(e)})).join("\n")+"\n");throw c.length=0,n}}))},expectMessageWillFire:function(e,n){if(!i)throw new Error("".concat(f," needs to be called before expect").concat(l,"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?a:c).push(e)}},expectMessage:function(e,n){return g([e],n)},expectMessageMany:g}}}},function(e,n){e.exports=require("relay-runtime")},function(e,n,t){"use strict";var r=t(4),o=r.disallowConsoleErrors,i=r.expectConsoleError,c=r.expectConsoleErrorsMany,a=r.expectConsoleErrorWillFire,s=t(6),u=s.disallowConsoleWarnings,l=s.expectConsoleWarning,f=s.expectConsoleWarningsMany,p=s.expectConsoleWarningWillFire,g=t(7),d=t(9),x=d.FIXTURE_TAG,h=d.generateTestsFromFixtures,y=t(14),v=t(16),w=t(18),b=t(19),m=b.disallowWarnings,W=b.expectToWarn,E=b.expectToWarnMany,C=b.expectWarningWillFire,M=t(20),F=M.createMockEnvironment,j=M.unwrapContainer;e.exports={cannotReadPropertyOfUndefined__DEPRECATED:function(e){return process.version.match(/^v16\.(.+)$/)?"Cannot read properties of undefined (reading '".concat(e,"')"):"Cannot read property '".concat(e,"' of undefined")},createMockEnvironment:F,describeWithFeatureFlags:g,disallowConsoleErrors:o,disallowConsoleWarnings:u,disallowWarnings:m,expectConsoleError:i,expectConsoleErrorsMany:c,expectConsoleErrorWillFire:a,expectConsoleWarningWillFire:p,expectConsoleWarning:l,expectConsoleWarningsMany:f,expectToWarn:W,expectToWarnMany:E,expectWarningWillFire:C,FIXTURE_TAG:x,generateTestsFromFixtures:h,matchers:y,printAST:v,simpleClone:w,unwrapContainer:j}},function(e,n,t){"use strict";var r=(0,t(1).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)}}},function(e,n){e.exports=require("@babel/runtime/helpers/toConsumableArray")},function(e,n,t){"use strict";var r=(0,t(1).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)}}},function(e,n,t){"use strict";var r=t(0)(t(8));e.exports=function(e,n,o){describe.each(e)("".concat(n," - Feature flags: %o"),(function(e){var n;beforeEach((function(){var o=t(2).RelayFeatureFlags;n=(0,r.default)({},o),Object.assign(o,e)})),afterEach((function(){var e=t(2).RelayFeatureFlags;Object.assign(e,n)})),o()}))}},function(e,n){e.exports=require("@babel/runtime/helpers/objectSpread2")},function(e,n,t){"use strict";var r=t(0)(t(10)),o=t(11),i=t(12),c=t(13),a=Symbol.for("FIXTURE_TAG");expect.addSnapshotSerializer({print: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[a]}}),e.exports={generateTestsFromFixtures:function(e,n){var t=i.readdirSync(e);test("has fixtures in ".concat(e),(function(){expect(t.length>0).toBe(!0)}));var s=t.filter((function(e){return e.startsWith("only.")}));s.length&&(test.skip.each(t.filter((function(e){return!e.startsWith("only.")})))("matches expected output: %s",(function(){})),t=s),test.each(t)("matches expected output: %s",(function(t){var s,u=i.readFileSync(c.join(e,t),"utf8"),l=o(u,n,t);expect((s={},(0,r.default)(s,a,!0),(0,r.default)(s,"input",u),(0,r.default)(s,"output",l),s)).toMatchSnapshot()}))},FIXTURE_TAG:a}},function(e,n){e.exports=require("@babel/runtime/helpers/defineProperty")},function(e,n,t){"use strict";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)}},function(e,n){e.exports=require("fs")},function(e,n){e.exports=require("path")},function(e,n,t){"use strict";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 i(e){return"["+e.map(o).join(", ")+"]"}function c(e){return e.length?e.map((function(e){return i([!!e[0]].concat(e.slice(1)))})).join(", "):"[]"}var a=t(15);if(!a.mock)throw new Error("toWarn(): Requires `jest.mock('warning')`.");var s=a.mock.calls.length;e();var u=a.mock.calls.slice(s);return n?(Array.isArray(n)||(n=[n]),{pass:!!u.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(i([!1].concat(n))," but ")+"`warning` received the following calls: "+"".concat(c(u),".")}}):{pass:!!u.filter((function(e){return!e[0]})).length,message:function(){return"Expected ".concat(r?"not ":"","to warn but ")+"`warning` received the following calls: "+"".concat(c(u),".")}}}}},function(e,n){e.exports=require("fbjs/lib/warning")},function(e,n,t){"use strict";var r=t(0)(t(17));e.exports=function(e){return function e(n,t){switch(typeof n){case"undefined":return"undefined";case"object":if(null===n)return"null";if(Array.isArray(n)){if(0===n.length)return"[]";var o,i="[\n",c=t+" ",a=(0,r.default)(n);try{for(a.s();!(o=a.n()).done;){var s=o.value;i+=c+e(s,c)+",\n"}}catch(e){a.e(e)}finally{a.f()}return i+=t+"]"}if("string"==typeof n.kind){for(var u="".concat(n.kind," {\n"),l=t+" ",f=0,p=Object.entries(n);f<p.length;f++){var g=p[f],d=g[0],x=g[1];"kind"!==d&&(u+="".concat(l).concat(d,": ").concat(e(x,l),",\n"))}return u+=t+"}"}if("function"==typeof n.toJSON)return e(n.toJSON(),t);for(var h="{\n",y=t+" ",v=0,w=Object.entries(n);v<w.length;v++){var b=w[v],m=b[0],W=b[1];h+="".concat(y).concat(JSON.stringify(m),": ").concat(e(W,y),",\n")}return h+=t+"}";case"string":case"number":case"boolean":return JSON.stringify(n,null,2).replace("\n","\n"+t);default:throw new Error("printAST doesn't handle values where "+"typeof value === '".concat(typeof n,"'."))}}(e,"")}},function(e,n){e.exports=require("@babel/runtime/helpers/createForOfIteratorHelper")},function(e,n,t){"use strict";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}},function(e,n,t){"use strict";var r=(0,t(1).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),i=2;i<r;i++)o[i-2]=arguments[i];if(!n){var c=0,a=t.replace(/%s/g,(function(){return String(o[c++])}));e(a)}}))}))}));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)}}},function(e,n){e.exports=require("relay-test-utils")}]);
@@ -1,9 +1,9 @@
1
1
  /**
2
- * Relay v0.0.0-main-e8cbdbdf
2
+ * Relay v0.0.0-main-d84cc395
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
- module.exports=function(e){var t={};function n(r){if(t[r])return t[r].exports;var o=t[r]={i:r,l:!1,exports:{}};return e[r].call(o.exports,o,o.exports,n),o.l=!0,o.exports}return n.m=e,n.c=t,n.d=function(e,t,r){n.o(e,t)||Object.defineProperty(e,t,{enumerable:!0,get:r})},n.r=function(e){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})},n.t=function(e,t){if(1&t&&(e=n(e)),8&t)return e;if(4&t&&"object"==typeof e&&e&&e.__esModule)return e;var r=Object.create(null);if(n.r(r),Object.defineProperty(r,"default",{enumerable:!0,value:e}),2&t&&"string"!=typeof e)for(var o in e)n.d(r,o,function(t){return e[t]}.bind(null,o));return r},n.n=function(e){var t=e&&e.__esModule?function(){return e.default}:function(){return e};return n.d(t,"a",t),t},n.o=function(e,t){return Object.prototype.hasOwnProperty.call(e,t)},n.p="",n(n.s=3)}([function(e,t){e.exports=require("@babel/runtime/helpers/interopRequireDefault")},function(e,t,n){"use strict";var r=n(0)(n(5)),o=console.error;e.exports={createConsoleInterceptionSystem:function(e,t,n){var c=!1,i=[],a=[],s=e.charAt(0).toUpperCase()+e.slice(1),u=s+"s",l="disallow".concat(s,"s");function f(e){var t=i.findIndex((function(t){return e.startsWith(t)}));if(a.length>0&&e.startsWith(a[0]))a.shift();else{if(!(t>=0))throw o("Unexpected ".concat(s,": ")+e),new Error("".concat(s,": ")+e);i.splice(t,1)}}function p(n,o){if(a.length>0)throw new Error("Cannot nest ".concat(t,"() calls."));a.push.apply(a,(0,r.default)(n));var c=o();if(a.length>0){var i=a.toString();throw a.length=0,new Error("Expected ".concat(e," in callback: ").concat(i))}return c}return{disallowMessages:function(){if(c)throw new Error("".concat(l," should be called only once."));c=!0,n(f),afterEach((function(){if(a.length=0,i.length>0){var t=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,t}}))},expectMessageWillFire:function(e,t){if(!c)throw new Error("".concat(l," needs to be called before expect").concat(u,"WillFire"));for(var n=0;n<(null!==(r=null==t?void 0:t.count)&&void 0!==r?r:1);n++){var r;i.push(e)}},expectMessage:function(e,t){return p([e],t)},expectMessageMany:p}}}},function(e,t){e.exports=require("relay-runtime")},function(e,t,n){"use strict";var r=n(4),o=r.disallowConsoleErrors,c=r.expectConsoleError,i=r.expectConsoleErrorsMany,a=r.expectConsoleErrorWillFire,s=n(6),u=n(8),l=u.FIXTURE_TAG,f=u.generateTestsFromFixtures,p=n(13),d=n(15),g=n(17),x=n(18),h=x.disallowWarnings,y=x.expectToWarn,v=x.expectToWarnMany,b=x.expectWarningWillFire,w=n(19),m=w.createMockEnvironment,E=w.unwrapContainer;e.exports={cannotReadPropertyOfUndefined__DEPRECATED:function(e){return process.version.match(/^v16\.(.+)$/)?"Cannot read properties of undefined (reading '".concat(e,"')"):"Cannot read property '".concat(e,"' of undefined")},createMockEnvironment:m,describeWithFeatureFlags:s,disallowConsoleErrors:o,disallowWarnings:h,expectConsoleError:c,expectConsoleErrorsMany:i,expectConsoleErrorWillFire:a,expectToWarn:y,expectToWarnMany:v,expectWarningWillFire:b,FIXTURE_TAG:l,generateTestsFromFixtures:f,matchers:p,printAST:d,simpleClone:g,unwrapContainer:E}},function(e,t,n){"use strict";var r=(0,n(1).createConsoleInterceptionSystem)("error","expectConsoleError",(function(e){jest.spyOn(console,"error").mockImplementation(e)}));e.exports={disallowConsoleErrors:function(){r.disallowMessages()},expectConsoleErrorWillFire:function(e,t){r.expectMessageWillFire(e,t)},expectConsoleError:function(e,t){return r.expectMessage(e,t)},expectConsoleErrorsMany:function(e,t){return r.expectMessageMany(e,t)}}},function(e,t){e.exports=require("@babel/runtime/helpers/toConsumableArray")},function(e,t,n){"use strict";var r=n(0)(n(7));e.exports=function(e,t,o){describe.each(e)("".concat(t," - Feature flags: %o"),(function(e){var t;beforeEach((function(){var o=n(2).RelayFeatureFlags;t=(0,r.default)({},o),Object.assign(o,e)})),afterEach((function(){var e=n(2).RelayFeatureFlags;Object.assign(e,t)})),o()}))}},function(e,t){e.exports=require("@babel/runtime/helpers/objectSpread2")},function(e,t,n){"use strict";var r=n(0)(n(9)),o=n(10),c=n(11),i=n(12),a=Symbol.for("FIXTURE_TAG");expect.addSnapshotSerializer({print:function(e){return Object.keys(e).map((function(t){return"~~~~~~~~~~ ".concat(t.toUpperCase()," ~~~~~~~~~~\n").concat(e[t])})).join("\n")},test:function(e){return e&&!0===e[a]}}),e.exports={generateTestsFromFixtures:function(e,t){var n=c.readdirSync(e);test("has fixtures in ".concat(e),(function(){expect(n.length>0).toBe(!0)}));var s=n.filter((function(e){return e.startsWith("only.")}));s.length&&(test.skip.each(n.filter((function(e){return!e.startsWith("only.")})))("matches expected output: %s",(function(){})),n=s),test.each(n)("matches expected output: %s",(function(n){var s,u=c.readFileSync(i.join(e,n),"utf8"),l=o(u,t,n);expect((s={},(0,r.default)(s,a,!0),(0,r.default)(s,"input",u),(0,r.default)(s,"output",l),s)).toMatchSnapshot()}))},FIXTURE_TAG:a}},function(e,t){e.exports=require("@babel/runtime/helpers/defineProperty")},function(e,t,n){"use strict";e.exports=function(e,t,n){if(/^# *expected-to-throw/.test(e)||/\.error\.\w+$/.test(n)){var r;try{r=t(e)}catch(e){return"THROWN EXCEPTION:\n\n".concat(e.toString())}throw new Error("Expected test file '".concat(n,"' to throw, but it passed:\n").concat(r))}return t(e)}},function(e,t){e.exports=require("fs")},function(e,t){e.exports=require("path")},function(e,t,n){"use strict";e.exports={toBeDeeplyFrozen:function(e){return function e(t){if(expect(Object.isFrozen(t)).toBe(!0),Array.isArray(t))t.forEach((function(t){return e(t)}));else if("object"==typeof t&&null!==t)for(var n in t)e(t[n])}(e),{pass:!0}},toWarn:function(e,t){var r=this.isNot;function o(e){return e instanceof RegExp?e.toString():JSON.stringify(e)}function c(e){return"["+e.map(o).join(", ")+"]"}function i(e){return e.length?e.map((function(e){return c([!!e[0]].concat(e.slice(1)))})).join(", "):"[]"}var a=n(14);if(!a.mock)throw new Error("toWarn(): Requires `jest.mock('warning')`.");var s=a.mock.calls.length;e();var u=a.mock.calls.slice(s);return t?(Array.isArray(t)||(t=[t]),{pass:!!u.find((function(e){return e.length===t.length+1&&e.every((function(e,n){if(!n)return!e;var r=t[n-1];return r instanceof RegExp?r.test(e):e===r}))})),message:function(){return"Expected ".concat(r?"not ":"","to warn: ")+"".concat(c([!1].concat(t))," but ")+"`warning` received the following calls: "+"".concat(i(u),".")}}):{pass:!!u.filter((function(e){return!e[0]})).length,message:function(){return"Expected ".concat(r?"not ":"","to warn but ")+"`warning` received the following calls: "+"".concat(i(u),".")}}}}},function(e,t){e.exports=require("fbjs/lib/warning")},function(e,t,n){"use strict";var r=n(0)(n(16));e.exports=function(e){return function e(t,n){switch(typeof t){case"undefined":return"undefined";case"object":if(null===t)return"null";if(Array.isArray(t)){if(0===t.length)return"[]";var o,c="[\n",i=n+" ",a=(0,r.default)(t);try{for(a.s();!(o=a.n()).done;){var s=o.value;c+=i+e(s,i)+",\n"}}catch(e){a.e(e)}finally{a.f()}return c+=n+"]"}if("string"==typeof t.kind){for(var u="".concat(t.kind," {\n"),l=n+" ",f=0,p=Object.entries(t);f<p.length;f++){var d=p[f],g=d[0],x=d[1];"kind"!==g&&(u+="".concat(l).concat(g,": ").concat(e(x,l),",\n"))}return u+=n+"}"}if("function"==typeof t.toJSON)return e(t.toJSON(),n);for(var h="{\n",y=n+" ",v=0,b=Object.entries(t);v<b.length;v++){var w=b[v],m=w[0],E=w[1];h+="".concat(y).concat(JSON.stringify(m),": ").concat(e(E,y),",\n")}return h+=n+"}";case"string":case"number":case"boolean":return JSON.stringify(t,null,2).replace("\n","\n"+n);default:throw new Error("printAST doesn't handle values where "+"typeof value === '".concat(typeof t,"'."))}}(e,"")}},function(e,t){e.exports=require("@babel/runtime/helpers/createForOfIteratorHelper")},function(e,t,n){"use strict";e.exports=function e(t){if(Array.isArray(t))return t.map(e);if(null!=t&&"object"==typeof t){var n={};for(var r in t)n[r]=e(t[r]);return n}return t}},function(e,t,n){"use strict";var r=(0,n(1).createConsoleInterceptionSystem)("warning","expectToWarn",(function(e){jest.mock("fbjs/lib/warning",(function(){return jest.fn((function(t,n){for(var r=arguments.length,o=new Array(r>2?r-2:0),c=2;c<r;c++)o[c-2]=arguments[c];if(!t){var i=0,a=n.replace(/%s/g,(function(){return String(o[i++])}));e(a)}}))}))}));e.exports={disallowWarnings:function(){r.disallowMessages()},expectWarningWillFire:function(e,t){r.expectMessageWillFire(e,t)},expectToWarn:function(e,t){return r.expectMessage(e,t)},expectToWarnMany:function(e,t){return r.expectMessageMany(e,t)}}},function(e,t){e.exports=require("relay-test-utils")}]);
9
+ module.exports=function(e){var n={};function t(r){if(n[r])return n[r].exports;var o=n[r]={i:r,l:!1,exports:{}};return e[r].call(o.exports,o,o.exports,t),o.l=!0,o.exports}return t.m=e,t.c=n,t.d=function(e,n,r){t.o(e,n)||Object.defineProperty(e,n,{enumerable:!0,get:r})},t.r=function(e){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})},t.t=function(e,n){if(1&n&&(e=t(e)),8&n)return e;if(4&n&&"object"==typeof e&&e&&e.__esModule)return e;var r=Object.create(null);if(t.r(r),Object.defineProperty(r,"default",{enumerable:!0,value:e}),2&n&&"string"!=typeof e)for(var o in e)t.d(r,o,function(n){return e[n]}.bind(null,o));return r},t.n=function(e){var n=e&&e.__esModule?function(){return e.default}:function(){return e};return t.d(n,"a",n),n},t.o=function(e,n){return Object.prototype.hasOwnProperty.call(e,n)},t.p="",t(t.s=3)}([function(e,n){e.exports=require("@babel/runtime/helpers/interopRequireDefault")},function(e,n,t){"use strict";var r=t(0)(t(5)),o=console.error;e.exports={createConsoleInterceptionSystem:function(e,n,t){var i=!1,c=[],a=[],s=[],u=e.charAt(0).toUpperCase()+e.slice(1),l=u+"s",f="disallow".concat(u,"s");function p(e){var n=c.findIndex((function(n){return e.startsWith(n)})),t=a.findIndex((function(n){return e.startsWith(n)}));if(s.length>0&&e.startsWith(s[0]))s.shift();else if(n>=0)c.splice(n,1);else{if(!(t>=0))throw o("Unexpected ".concat(u,": ")+e),new Error("".concat(u,": ")+e);a.splice(t,1)}}function g(t,o){if(s.length>0)throw new Error("Cannot nest ".concat(n,"() calls."));s.push.apply(s,(0,r.default)(t));var i=o();if(s.length>0){var c=s.toString();throw s.length=0,new Error("Expected ".concat(e," in callback: ").concat(c))}return i}return{disallowMessages:function(){if(i)throw new Error("".concat(f," should be called only once."));i=!0,t(p),afterEach((function(){if(a.length=0,s.length=0,c.length>0){var n=new Error("Some ".concat(c.length," expected ").concat(e,"s where not triggered:\n\n")+Array.from(c,(function(e){return" * ".concat(e)})).join("\n")+"\n");throw c.length=0,n}}))},expectMessageWillFire:function(e,n){if(!i)throw new Error("".concat(f," needs to be called before expect").concat(l,"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?a:c).push(e)}},expectMessage:function(e,n){return g([e],n)},expectMessageMany:g}}}},function(e,n){e.exports=require("relay-runtime")},function(e,n,t){"use strict";var r=t(4),o=r.disallowConsoleErrors,i=r.expectConsoleError,c=r.expectConsoleErrorsMany,a=r.expectConsoleErrorWillFire,s=t(6),u=s.disallowConsoleWarnings,l=s.expectConsoleWarning,f=s.expectConsoleWarningsMany,p=s.expectConsoleWarningWillFire,g=t(7),d=t(9),x=d.FIXTURE_TAG,h=d.generateTestsFromFixtures,y=t(14),v=t(16),w=t(18),b=t(19),m=b.disallowWarnings,W=b.expectToWarn,E=b.expectToWarnMany,C=b.expectWarningWillFire,M=t(20),F=M.createMockEnvironment,j=M.unwrapContainer;e.exports={cannotReadPropertyOfUndefined__DEPRECATED:function(e){return process.version.match(/^v16\.(.+)$/)?"Cannot read properties of undefined (reading '".concat(e,"')"):"Cannot read property '".concat(e,"' of undefined")},createMockEnvironment:F,describeWithFeatureFlags:g,disallowConsoleErrors:o,disallowConsoleWarnings:u,disallowWarnings:m,expectConsoleError:i,expectConsoleErrorsMany:c,expectConsoleErrorWillFire:a,expectConsoleWarningWillFire:p,expectConsoleWarning:l,expectConsoleWarningsMany:f,expectToWarn:W,expectToWarnMany:E,expectWarningWillFire:C,FIXTURE_TAG:x,generateTestsFromFixtures:h,matchers:y,printAST:v,simpleClone:w,unwrapContainer:j}},function(e,n,t){"use strict";var r=(0,t(1).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)}}},function(e,n){e.exports=require("@babel/runtime/helpers/toConsumableArray")},function(e,n,t){"use strict";var r=(0,t(1).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)}}},function(e,n,t){"use strict";var r=t(0)(t(8));e.exports=function(e,n,o){describe.each(e)("".concat(n," - Feature flags: %o"),(function(e){var n;beforeEach((function(){var o=t(2).RelayFeatureFlags;n=(0,r.default)({},o),Object.assign(o,e)})),afterEach((function(){var e=t(2).RelayFeatureFlags;Object.assign(e,n)})),o()}))}},function(e,n){e.exports=require("@babel/runtime/helpers/objectSpread2")},function(e,n,t){"use strict";var r=t(0)(t(10)),o=t(11),i=t(12),c=t(13),a=Symbol.for("FIXTURE_TAG");expect.addSnapshotSerializer({print: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[a]}}),e.exports={generateTestsFromFixtures:function(e,n){var t=i.readdirSync(e);test("has fixtures in ".concat(e),(function(){expect(t.length>0).toBe(!0)}));var s=t.filter((function(e){return e.startsWith("only.")}));s.length&&(test.skip.each(t.filter((function(e){return!e.startsWith("only.")})))("matches expected output: %s",(function(){})),t=s),test.each(t)("matches expected output: %s",(function(t){var s,u=i.readFileSync(c.join(e,t),"utf8"),l=o(u,n,t);expect((s={},(0,r.default)(s,a,!0),(0,r.default)(s,"input",u),(0,r.default)(s,"output",l),s)).toMatchSnapshot()}))},FIXTURE_TAG:a}},function(e,n){e.exports=require("@babel/runtime/helpers/defineProperty")},function(e,n,t){"use strict";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)}},function(e,n){e.exports=require("fs")},function(e,n){e.exports=require("path")},function(e,n,t){"use strict";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 i(e){return"["+e.map(o).join(", ")+"]"}function c(e){return e.length?e.map((function(e){return i([!!e[0]].concat(e.slice(1)))})).join(", "):"[]"}var a=t(15);if(!a.mock)throw new Error("toWarn(): Requires `jest.mock('warning')`.");var s=a.mock.calls.length;e();var u=a.mock.calls.slice(s);return n?(Array.isArray(n)||(n=[n]),{pass:!!u.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(i([!1].concat(n))," but ")+"`warning` received the following calls: "+"".concat(c(u),".")}}):{pass:!!u.filter((function(e){return!e[0]})).length,message:function(){return"Expected ".concat(r?"not ":"","to warn but ")+"`warning` received the following calls: "+"".concat(c(u),".")}}}}},function(e,n){e.exports=require("fbjs/lib/warning")},function(e,n,t){"use strict";var r=t(0)(t(17));e.exports=function(e){return function e(n,t){switch(typeof n){case"undefined":return"undefined";case"object":if(null===n)return"null";if(Array.isArray(n)){if(0===n.length)return"[]";var o,i="[\n",c=t+" ",a=(0,r.default)(n);try{for(a.s();!(o=a.n()).done;){var s=o.value;i+=c+e(s,c)+",\n"}}catch(e){a.e(e)}finally{a.f()}return i+=t+"]"}if("string"==typeof n.kind){for(var u="".concat(n.kind," {\n"),l=t+" ",f=0,p=Object.entries(n);f<p.length;f++){var g=p[f],d=g[0],x=g[1];"kind"!==d&&(u+="".concat(l).concat(d,": ").concat(e(x,l),",\n"))}return u+=t+"}"}if("function"==typeof n.toJSON)return e(n.toJSON(),t);for(var h="{\n",y=t+" ",v=0,w=Object.entries(n);v<w.length;v++){var b=w[v],m=b[0],W=b[1];h+="".concat(y).concat(JSON.stringify(m),": ").concat(e(W,y),",\n")}return h+=t+"}";case"string":case"number":case"boolean":return JSON.stringify(n,null,2).replace("\n","\n"+t);default:throw new Error("printAST doesn't handle values where "+"typeof value === '".concat(typeof n,"'."))}}(e,"")}},function(e,n){e.exports=require("@babel/runtime/helpers/createForOfIteratorHelper")},function(e,n,t){"use strict";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}},function(e,n,t){"use strict";var r=(0,t(1).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),i=2;i<r;i++)o[i-2]=arguments[i];if(!n){var c=0,a=t.replace(/%s/g,(function(){return String(o[c++])}));e(a)}}))}))}));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)}}},function(e,n){e.exports=require("relay-test-utils")}]);