vest 5.0.2-dev-d315d9 → 5.0.2

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.
Files changed (213) hide show
  1. package/README.md +94 -2
  2. package/SuiteSerializer/package.json +9 -0
  3. package/dist/cjs/SuiteSerializer.development.js +19 -0
  4. package/dist/cjs/SuiteSerializer.js +6 -0
  5. package/dist/cjs/SuiteSerializer.production.js +1 -0
  6. package/dist/cjs/classnames.development.js +19 -1
  7. package/dist/cjs/classnames.js +0 -1
  8. package/dist/cjs/classnames.production.js +1 -1
  9. package/dist/cjs/compose.js +2 -3
  10. package/dist/cjs/compounds.js +2 -3
  11. package/dist/cjs/date.js +6 -0
  12. package/dist/cjs/email.js +6 -0
  13. package/dist/cjs/enforce/compose.development.js +1 -5
  14. package/dist/cjs/enforce/compose.production.js +1 -1
  15. package/dist/cjs/enforce/compounds.development.js +3 -6
  16. package/dist/cjs/enforce/compounds.production.js +1 -1
  17. package/dist/cjs/enforce/date.development.js +26 -0
  18. package/dist/cjs/enforce/date.production.js +1 -0
  19. package/dist/cjs/enforce/email.development.js +26 -0
  20. package/dist/cjs/enforce/email.production.js +1 -0
  21. package/dist/cjs/enforce/isURL.development.js +26 -0
  22. package/dist/cjs/enforce/isURL.production.js +1 -0
  23. package/dist/cjs/enforce/schema.development.js +3 -6
  24. package/dist/cjs/enforce/schema.production.js +1 -1
  25. package/dist/cjs/isURL.js +6 -0
  26. package/dist/cjs/parser.development.js +20 -4
  27. package/dist/cjs/parser.js +0 -1
  28. package/dist/cjs/parser.production.js +1 -1
  29. package/dist/cjs/promisify.development.js +18 -1
  30. package/dist/cjs/promisify.js +0 -1
  31. package/dist/cjs/promisify.production.js +1 -1
  32. package/dist/cjs/schema.js +2 -3
  33. package/dist/cjs/vest.development.js +1466 -1554
  34. package/dist/cjs/vest.js +0 -1
  35. package/dist/cjs/vest.production.js +1 -1
  36. package/dist/es/SuiteSerializer.development.js +17 -0
  37. package/dist/es/SuiteSerializer.production.js +1 -0
  38. package/dist/es/classnames.development.js +19 -1
  39. package/dist/es/classnames.production.js +1 -1
  40. package/dist/es/enforce/date.development.js +2 -0
  41. package/dist/es/enforce/date.production.js +1 -0
  42. package/dist/es/enforce/email.development.js +2 -0
  43. package/dist/es/enforce/email.production.js +1 -0
  44. package/dist/es/enforce/isURL.development.js +2 -0
  45. package/dist/es/enforce/isURL.production.js +1 -0
  46. package/dist/es/parser.development.js +20 -2
  47. package/dist/es/parser.production.js +1 -1
  48. package/dist/es/promisify.development.js +18 -1
  49. package/dist/es/promisify.production.js +1 -1
  50. package/dist/es/vest.development.js +1476 -1562
  51. package/dist/es/vest.production.js +1 -1
  52. package/dist/umd/SuiteSerializer.development.js +23 -0
  53. package/dist/umd/SuiteSerializer.production.js +1 -0
  54. package/dist/umd/classnames.development.js +19 -1
  55. package/dist/umd/classnames.production.js +1 -1
  56. package/dist/umd/enforce/compose.development.js +1 -7
  57. package/dist/umd/enforce/compose.production.js +1 -1
  58. package/dist/umd/enforce/compounds.development.js +3 -6
  59. package/dist/umd/enforce/compounds.production.js +1 -1
  60. package/dist/umd/enforce/date.development.js +30 -0
  61. package/dist/umd/enforce/date.production.js +1 -0
  62. package/dist/umd/enforce/email.development.js +30 -0
  63. package/dist/umd/enforce/email.production.js +1 -0
  64. package/dist/umd/enforce/isURL.development.js +30 -0
  65. package/dist/umd/enforce/isURL.production.js +1 -0
  66. package/dist/umd/enforce/schema.development.js +3 -6
  67. package/dist/umd/enforce/schema.production.js +1 -1
  68. package/dist/umd/parser.development.js +23 -7
  69. package/dist/umd/parser.production.js +1 -1
  70. package/dist/umd/promisify.development.js +18 -1
  71. package/dist/umd/promisify.production.js +1 -1
  72. package/dist/umd/vest.development.js +1480 -1569
  73. package/dist/umd/vest.production.js +1 -1
  74. package/enforce/date/package.json +9 -0
  75. package/enforce/email/package.json +9 -0
  76. package/enforce/isURL/package.json +9 -0
  77. package/package.json +254 -132
  78. package/types/SuiteSerializer.d.ts +201 -0
  79. package/types/SuiteSerializer.d.ts.map +1 -0
  80. package/types/classnames.d.ts +91 -33
  81. package/types/classnames.d.ts.map +1 -1
  82. package/types/enforce/date.d.ts +2 -0
  83. package/types/enforce/date.d.ts.map +1 -0
  84. package/types/enforce/email.d.ts +2 -0
  85. package/types/enforce/email.d.ts.map +1 -0
  86. package/types/enforce/isURL.d.ts +2 -0
  87. package/types/enforce/isURL.d.ts.map +1 -0
  88. package/types/parser.d.ts +86 -31
  89. package/types/parser.d.ts.map +1 -1
  90. package/types/promisify.d.ts +82 -28
  91. package/types/promisify.d.ts.map +1 -1
  92. package/types/vest.d.ts +275 -208
  93. package/types/vest.d.ts.map +1 -1
  94. package/src/__tests__/__snapshots__/integration.async-tests.test.ts.snap +0 -71
  95. package/src/__tests__/__snapshots__/integration.base.test.ts.snap +0 -71
  96. package/src/__tests__/__snapshots__/integration.stateful-async.test.ts.snap +0 -243
  97. package/src/__tests__/__snapshots__/integration.stateful-tests.test.ts.snap +0 -376
  98. package/src/__tests__/integration.async-tests.test.ts +0 -90
  99. package/src/__tests__/integration.base.test.ts +0 -45
  100. package/src/__tests__/integration.exclusive.test.ts +0 -88
  101. package/src/__tests__/integration.stateful-async.test.ts +0 -137
  102. package/src/__tests__/integration.stateful-tests.test.ts +0 -155
  103. package/src/__tests__/isolate.test.ts +0 -288
  104. package/src/__tests__/state_refill.test.ts +0 -41
  105. package/src/core/SuiteWalker/SuiteWalker.ts +0 -64
  106. package/src/core/SuiteWalker/__tests__/hasRemainingTests.test.ts +0 -130
  107. package/src/core/VestBus/VestBus.ts +0 -78
  108. package/src/core/context/PersistedContext.ts +0 -243
  109. package/src/core/context/SuiteContext.ts +0 -74
  110. package/src/core/isolate/IsolateTest/IsolateTest.ts +0 -213
  111. package/src/core/isolate/IsolateTest/IsolateTestReconciler.ts +0 -156
  112. package/src/core/isolate/IsolateTest/IsolateTestStateMachine.ts +0 -69
  113. package/src/core/isolate/IsolateTest/SimpleStateMachine.ts +0 -43
  114. package/src/core/isolate/IsolateTest/TestWalker.ts +0 -77
  115. package/src/core/isolate/IsolateTypes.ts +0 -10
  116. package/src/core/isolate/isIsolate.ts +0 -6
  117. package/src/core/isolate/isolate.ts +0 -110
  118. package/src/core/isolate/reconciler/Reconciler/Reconciler.ts +0 -123
  119. package/src/core/isolate/reconciler/cancelOverriddenPendingTest.ts +0 -15
  120. package/src/core/isolate/reconciler/isSameProfileTest.ts +0 -12
  121. package/src/core/isolate/walker.ts +0 -127
  122. package/src/core/test/TestTypes.ts +0 -3
  123. package/src/core/test/__tests__/IsolateTest.test.ts +0 -152
  124. package/src/core/test/__tests__/__snapshots__/IsolateTest.test.ts.snap +0 -39
  125. package/src/core/test/__tests__/__snapshots__/memo.test.ts.snap +0 -101
  126. package/src/core/test/__tests__/__snapshots__/test.test.ts.snap +0 -231
  127. package/src/core/test/__tests__/key.test.ts +0 -195
  128. package/src/core/test/__tests__/memo.test.ts +0 -218
  129. package/src/core/test/__tests__/merging_of_previous_test_runs.test.ts +0 -341
  130. package/src/core/test/__tests__/runAsyncTest.test.ts +0 -175
  131. package/src/core/test/__tests__/test.test.ts +0 -226
  132. package/src/core/test/helpers/__tests__/nonMatchingSeverityProfile.test.ts +0 -52
  133. package/src/core/test/helpers/asVestTest.ts +0 -9
  134. package/src/core/test/helpers/matchingFieldName.ts +0 -16
  135. package/src/core/test/helpers/matchingGroupName.ts +0 -12
  136. package/src/core/test/helpers/nonMatchingSeverityProfile.ts +0 -14
  137. package/src/core/test/helpers/shouldUseErrorMessage.ts +0 -9
  138. package/src/core/test/test.memo.ts +0 -81
  139. package/src/core/test/test.ts +0 -64
  140. package/src/core/test/testLevelFlowControl/runTest.ts +0 -86
  141. package/src/core/test/testLevelFlowControl/verifyTestRun.ts +0 -32
  142. package/src/core/test/testObjectIsolate.ts +0 -11
  143. package/src/errors/ErrorStrings.ts +0 -4
  144. package/src/exports/__tests__/classnames.test.ts +0 -92
  145. package/src/exports/__tests__/parser.test.ts +0 -441
  146. package/src/exports/__tests__/promisify.test.ts +0 -77
  147. package/src/exports/classnames.ts +0 -35
  148. package/src/exports/enforce@compose.ts +0 -1
  149. package/src/exports/enforce@compounds.ts +0 -1
  150. package/src/exports/enforce@schema.ts +0 -1
  151. package/src/exports/parser.ts +0 -63
  152. package/src/exports/promisify.ts +0 -18
  153. package/src/hooks/__tests__/__snapshots__/include.test.ts.snap +0 -794
  154. package/src/hooks/__tests__/eager.test.ts +0 -130
  155. package/src/hooks/__tests__/exclusive.test.ts +0 -578
  156. package/src/hooks/__tests__/include.test.ts +0 -431
  157. package/src/hooks/__tests__/optional.test.ts +0 -83
  158. package/src/hooks/__tests__/warn.test.ts +0 -42
  159. package/src/hooks/exclusive.ts +0 -179
  160. package/src/hooks/include.ts +0 -54
  161. package/src/hooks/mode.ts +0 -47
  162. package/src/hooks/optional/OptionalTypes.ts +0 -31
  163. package/src/hooks/optional/optional.ts +0 -69
  164. package/src/hooks/warn.ts +0 -19
  165. package/src/isolates/__tests__/__snapshots__/each.test.ts.snap +0 -3
  166. package/src/isolates/__tests__/__snapshots__/group.test.ts.snap +0 -114
  167. package/src/isolates/__tests__/__snapshots__/omitWhen.test.ts.snap +0 -443
  168. package/src/isolates/__tests__/__snapshots__/skipWhen.test.ts.snap +0 -99
  169. package/src/isolates/__tests__/each.test.ts +0 -35
  170. package/src/isolates/__tests__/group.test.ts +0 -362
  171. package/src/isolates/__tests__/omitWhen.test.ts +0 -246
  172. package/src/isolates/__tests__/skipWhen.test.ts +0 -163
  173. package/src/isolates/each.ts +0 -30
  174. package/src/isolates/group.ts +0 -9
  175. package/src/isolates/omitWhen.ts +0 -41
  176. package/src/isolates/skipWhen.ts +0 -42
  177. package/src/suite/__tests__/__snapshots__/create.test.ts.snap +0 -67
  178. package/src/suite/__tests__/create.test.ts +0 -109
  179. package/src/suite/__tests__/remove.test.ts +0 -50
  180. package/src/suite/__tests__/resetField.test.ts +0 -74
  181. package/src/suite/createSuite.ts +0 -94
  182. package/src/suite/runCallbacks.ts +0 -28
  183. package/src/suiteResult/Severity.ts +0 -15
  184. package/src/suiteResult/SuiteResultTypes.ts +0 -42
  185. package/src/suiteResult/__tests__/done.test.ts +0 -334
  186. package/src/suiteResult/__tests__/produce.test.ts +0 -163
  187. package/src/suiteResult/done/deferDoneCallback.ts +0 -28
  188. package/src/suiteResult/done/shouldSkipDoneRegistration.ts +0 -20
  189. package/src/suiteResult/selectors/__tests__/__snapshots__/collectFailureMessages.test.ts.snap +0 -89
  190. package/src/suiteResult/selectors/__tests__/collectFailureMessages.test.ts +0 -124
  191. package/src/suiteResult/selectors/__tests__/getFailures.test.ts +0 -158
  192. package/src/suiteResult/selectors/__tests__/getFailuresByGroup.test.ts +0 -199
  193. package/src/suiteResult/selectors/__tests__/hasFailures.test.ts +0 -141
  194. package/src/suiteResult/selectors/__tests__/hasFailuresByGroup.test.ts +0 -185
  195. package/src/suiteResult/selectors/__tests__/hasFailuresByTestObject.test.ts +0 -88
  196. package/src/suiteResult/selectors/__tests__/isValid.test.ts +0 -359
  197. package/src/suiteResult/selectors/__tests__/isValidByGroup.test.ts +0 -480
  198. package/src/suiteResult/selectors/collectFailures.ts +0 -43
  199. package/src/suiteResult/selectors/hasFailuresByTestObjects.ts +0 -62
  200. package/src/suiteResult/selectors/produceSuiteSummary.ts +0 -135
  201. package/src/suiteResult/selectors/shouldAddValidProperty.ts +0 -148
  202. package/src/suiteResult/selectors/suiteSelectors.ts +0 -199
  203. package/src/suiteResult/suiteResult.ts +0 -15
  204. package/src/suiteResult/suiteRunResult.ts +0 -43
  205. package/src/vest.ts +0 -36
  206. package/testUtils/TVestMock.ts +0 -5
  207. package/testUtils/__tests__/partition.test.ts +0 -21
  208. package/testUtils/mockThrowError.ts +0 -16
  209. package/testUtils/partition.ts +0 -13
  210. package/testUtils/suiteDummy.ts +0 -109
  211. package/testUtils/testDummy.ts +0 -157
  212. package/testUtils/testPromise.ts +0 -3
  213. package/tsconfig.json +0 -90
package/README.md CHANGED
@@ -1,3 +1,95 @@
1
- # vest-5
1
+ # Vest - Declarative validations framework
2
2
 
3
- Declarative Form Validations Framework
3
+ ![Vest](https://cdn.jsdelivr.net/gh/ealush/vest@assets/logo_250.png 'Vest')
4
+
5
+ [Vest Documentation](https://vestjs.dev)
6
+
7
+ [![Join Discord](https://badgen.net/discord/online-members/WmADZpJnSe?icon=discord&label=Discord)](https://discord.gg/WmADZpJnSe) [![Github Stars](https://badgen.net/github/stars/ealush/vest?color=yellow&label=Github%20🌟)](https://github.com/ealush/vest) [![Next Tag](https://badgen.net/npm/v/vest/next)](https://vestjs.dev/vest-5-is-ready) [![Version](https://badgen.net/npm/v/vest?&icon=npm)](https://www.npmjs.com/package/vest) [![Downloads](https://badgen.net/npm/dt/vest?label=Downloads)](https://www.npmjs.com/package/vest) [![bundlephobia](https://badgen.net/bundlephobia/minzip/vest)](https://bundlephobia.com/package/vest) [![Status](https://badgen.net/github/status/ealush/vest)](https://github.com/ealush/vest/actions)
8
+
9
+ ---
10
+
11
+ Vest is a declarative validations framework designed to simplify the process of writing and maintaining form validations for your web application. Inspired by popular unit testing libraries such as Mocha and Jest, Vest allows developers to describe their validation requirements using a suite-like syntax, separating validation logic from feature logic to create more maintainable and readable code.
12
+
13
+ Vest's framework-agnostic approach means that it can be used with any UI framework, or without any framework at all. With Vest, you can reduce code bloat, improve feature readability and maintainability, and enhance the user experience of your web application.
14
+
15
+ ```js
16
+ test('username', 'Username is required', () => {
17
+ enforce(data.username).isNotBlank();
18
+ });
19
+
20
+ test('username', 'Username must be at least 3 chars', () => {
21
+ enforce(data.username).longerThanOrEquals(3);
22
+ });
23
+
24
+ test('username', 'Username already taken', async () => {
25
+ await doesUserExist(data.username);
26
+ });
27
+ ```
28
+
29
+ ## Installation
30
+
31
+ ```
32
+ npm i vest
33
+ ```
34
+
35
+ ## Motivation
36
+
37
+ Building web applications often involves writing complex forms that require validation. As the complexity of these forms increases, so does the complexity of the validation logic required to ensure data is accurate and complete.
38
+
39
+ At this point, developers may start to experience issues with code bloat, poor maintainability, and difficulty in managing validation logic across different features of an application. This can lead to bugs, errors, and a poor user experience.
40
+
41
+ Vest was designed to address these issues by providing a simple, intuitive way to write form validation that is easy to learn, scalable, and extensible. By separating validation logic from feature logic, Vest helps developers create maintainable code that is easy to update, debug, and refactor.
42
+
43
+ With Vest, developers can reduce the complexity and increase the readability of their code, leading to more efficient development cycles, fewer bugs, and a better user experience overall.
44
+
45
+ # Why Vest?
46
+
47
+ Writing form validations can be time-consuming and complex, especially as your web application grows and evolves over time. Vest simplifies the process by providing a set of powerful tools that take care of the annoying parts for you, such as managing validation state and handling async validations.
48
+
49
+ Vest's declarative syntax is also designed to be easy to learn, especially for developers who are already familiar with unit testing frameworks. With Vest, you can leverage your existing knowledge to write effective form validations quickly and easily.
50
+
51
+ ### 💡 Easy to Learn
52
+
53
+ Vest adopts the syntax and style of unit testing frameworks, so you can leverage the knowledge you already have to write your form validations.
54
+
55
+ ### 🎨 Framework Agnostic
56
+
57
+ Vest is framework-agnostic, which means you can use it with any UI framework out there.
58
+
59
+ ### 🧠 Takes Care of the Annoying Parts
60
+
61
+ Vest manages its validation state, handles async validations, and much more, so you don't have to.
62
+
63
+ ### 🧩 Extendable
64
+
65
+ You can easily add new kinds of validations to Vest according to your needs.
66
+
67
+ ### ♻️ Reusable Validation Logic
68
+
69
+ Validation logic in Vest can be shared across multiple features in your app, making it easy to maintain and refactor your codebase.
70
+
71
+ ### 🧬 Supports Declarative Syntax
72
+
73
+ Vest's declarative syntax makes it easy to describe your form or feature structure and write clear, concise validations.
74
+
75
+ ### 🧪 Promotes Testing and Debugging
76
+
77
+ By separating validation logic from feature logic, Vest makes it easier to test and debug your code, which can save you time and reduce errors.
78
+
79
+ # Getting Started
80
+
81
+ [Vest Documentation](https://vestjs.dev)
82
+
83
+ Here are some code sandboxes to get you started:
84
+
85
+ - [React](https://codesandbox.io/s/react-vest-5-gdc698?file=/src/suite.js)
86
+ - [Vue](https://codesandbox.io/s/vue-vest-5-d1g236?file=/src/suite.js)
87
+ - [Svelte](https://codesandbox.io/s/svelte-vest-5-imnq9z?file=/suite.js)
88
+ - [Vanilla](https://codesandbox.io/s/vest-vanilla-js-vest-5-3v4pqk?file=/src/suite.js)
89
+ - [Angular](https://github.com/wardbell/ngc-validate) (by @wardbell)
90
+
91
+ # Contribute
92
+
93
+ Information describing how to contribute can be found here:
94
+
95
+ https://github.com/ealush/vest/blob/latest/CONTRIBUTING.md
@@ -0,0 +1,9 @@
1
+ {
2
+ "main": "../dist/cjs/SuiteSerializer.js",
3
+ "module": "../dist/es/SuiteSerializer.production.js",
4
+ "unpkg": "../dist/umd/SuiteSerializer.production.js",
5
+ "jsdelivr": "../dist/umd/SuiteSerializer.production.js",
6
+ "name": "SuiteSerializer",
7
+ "types": "../types/SuiteSerializer.d.ts",
8
+ "private": true
9
+ }
@@ -0,0 +1,19 @@
1
+ 'use strict';
2
+
3
+ var vestjsRuntime = require('vestjs-runtime');
4
+
5
+ class SuiteSerializer {
6
+ static serialize(suite) {
7
+ const dump = Object.assign(Object.assign({}, suite.dump()), { output: undefined });
8
+ return vestjsRuntime.IsolateSerializer.serialize(dump);
9
+ }
10
+ static deserialize(serialized) {
11
+ return vestjsRuntime.IsolateSerializer.deserialize(serialized);
12
+ }
13
+ static resume(suite, root) {
14
+ const suiteRoot = SuiteSerializer.deserialize(root);
15
+ suite.resume(suiteRoot);
16
+ }
17
+ }
18
+
19
+ exports.SuiteSerializer = SuiteSerializer;
@@ -0,0 +1,6 @@
1
+ 'use strict'
2
+ if (process.env.NODE_ENV === 'production') {
3
+ module.exports = require('./SuiteSerializer.production.js');
4
+ } else {
5
+ module.exports = require('./SuiteSerializer.development.js');
6
+ }
@@ -0,0 +1 @@
1
+ "use strict";var e=require("vestjs-runtime");class i{static serialize(i){const s=Object.assign(Object.assign({},i.dump()),{output:void 0});return e.IsolateSerializer.serialize(s)}static deserialize(i){return e.IsolateSerializer.deserialize(i)}static resume(e,s){const r=i.deserialize(s);e.resume(r)}}exports.SuiteSerializer=i;
@@ -3,12 +3,30 @@
3
3
  var vestUtils = require('vest-utils');
4
4
  var vest = require('vest');
5
5
 
6
+ var ErrorStrings;
7
+ (function (ErrorStrings) {
8
+ ErrorStrings["HOOK_CALLED_OUTSIDE"] = "hook called outside of a running suite.";
9
+ ErrorStrings["EXPECTED_VEST_TEST"] = "Expected value to be an instance of IsolateTest";
10
+ ErrorStrings["FIELD_NAME_REQUIRED"] = "Field name must be passed";
11
+ ErrorStrings["SUITE_MUST_BE_INITIALIZED_WITH_FUNCTION"] = "Suite must be initialized with a function";
12
+ ErrorStrings["PROMISIFY_REQUIRE_FUNCTION"] = "Vest.Promisify must be called with a function";
13
+ ErrorStrings["PARSER_EXPECT_RESULT_OBJECT"] = "Vest parser: expected argument at position 0 to be Vest's result object.";
14
+ ErrorStrings["WARN_MUST_BE_CALLED_FROM_TEST"] = "Warn must be called from within the body of a test function";
15
+ ErrorStrings["EACH_CALLBACK_MUST_BE_A_FUNCTION"] = "Each must be called with a function";
16
+ ErrorStrings["INVALID_PARAM_PASSED_TO_FUNCTION"] = "Incompatible params passed to {fn_name} function. \"{param}\" must be of type {expected}";
17
+ ErrorStrings["TESTS_CALLED_IN_DIFFERENT_ORDER"] = "Vest Critical Error: Tests called in different order than previous run.\n expected: {fieldName}\n received: {prevName}\n This can happen on one of two reasons:\n 1. You're using if/else statements to conditionally select tests. Instead, use \"skipWhen\".\n 2. You are iterating over a list of tests, and their order changed. Use \"each\" and a custom key prop so that Vest retains their state.";
18
+ ErrorStrings["UNEXPECTED_TEST_REGISTRATION_ERROR"] = "Unexpected error encountered during test registration.\n Please report this issue to Vest's Github repository.\n Test Object: {testObject}.\n Error: {error}.";
19
+ ErrorStrings["UNEXPECTED_TEST_RUN_ERROR"] = "Unexpected error encountered during test run. Please report this issue to Vest's Github repository.\n Test Object: {testObject}.";
20
+ ErrorStrings["INCLUDE_SELF"] = "Trying to call include.when on the same field.";
21
+ })(ErrorStrings || (ErrorStrings = {}));
22
+
6
23
  function parse(summary) {
7
- vestUtils.invariant(summary && vestUtils.hasOwnProperty(summary, 'valid'), "Vest parser: expected argument at position 0 to be Vest's result object.");
24
+ vestUtils.invariant(summary && vestUtils.hasOwnProperty(summary, 'valid'), ErrorStrings.PARSER_EXPECT_RESULT_OBJECT);
8
25
  const sel = vest.suiteSelectors(summary);
9
26
  const testedStorage = {};
10
27
  const selectors = {
11
28
  invalid: sel.hasErrors,
29
+ pending: sel.isPending,
12
30
  tested: isTested,
13
31
  untested: isUntested,
14
32
  valid: sel.isValid,
@@ -1,5 +1,4 @@
1
1
  'use strict'
2
-
3
2
  if (process.env.NODE_ENV === 'production') {
4
3
  module.exports = require('./classnames.production.js');
5
4
  } else {
@@ -1 +1 @@
1
- "use strict";var t=require("vest-utils"),s=require("vest");module.exports=function(e,n={}){const i=function(e){t.invariant(e&&t.hasOwnProperty(e,"valid"),"Vest parser: expected argument at position 0 to be Vest's result object.");const n=s.suiteSelectors(e),i={},r={invalid:n.hasErrors,tested:function(s){return t.isNullish(s)?t.isPositive(e.testCount):t.hasOwnProperty(i,s)?i[s]:(o(s),r.tested(s))},untested:function(s){return!(t.isPositive(e.testCount)&&r.tested(s))},valid:n.isValid,warning:n.hasWarnings};return r;function o(s){i[s]=t.hasOwnProperty(e.tests,s)&&t.isPositive(e.tests[s].testCount)}}(e);return function(s){const e=[];for(const r in n){const o=r;t.isFunction(i[o])&&i[o](s)&&e.push(n[o])}return e.join(" ")}};
1
+ "use strict";var e,t=require("vest-utils"),s=require("vest");!function(e){e.HOOK_CALLED_OUTSIDE="hook called outside of a running suite.",e.EXPECTED_VEST_TEST="Expected value to be an instance of IsolateTest",e.FIELD_NAME_REQUIRED="Field name must be passed",e.SUITE_MUST_BE_INITIALIZED_WITH_FUNCTION="Suite must be initialized with a function",e.PROMISIFY_REQUIRE_FUNCTION="Vest.Promisify must be called with a function",e.PARSER_EXPECT_RESULT_OBJECT="Vest parser: expected argument at position 0 to be Vest's result object.",e.WARN_MUST_BE_CALLED_FROM_TEST="Warn must be called from within the body of a test function",e.EACH_CALLBACK_MUST_BE_A_FUNCTION="Each must be called with a function",e.INVALID_PARAM_PASSED_TO_FUNCTION='Incompatible params passed to {fn_name} function. "{param}" must be of type {expected}',e.TESTS_CALLED_IN_DIFFERENT_ORDER='Vest Critical Error: Tests called in different order than previous run.\n expected: {fieldName}\n received: {prevName}\n This can happen on one of two reasons:\n 1. You\'re using if/else statements to conditionally select tests. Instead, use "skipWhen".\n 2. You are iterating over a list of tests, and their order changed. Use "each" and a custom key prop so that Vest retains their state.',e.UNEXPECTED_TEST_REGISTRATION_ERROR="Unexpected error encountered during test registration.\n Please report this issue to Vest's Github repository.\n Test Object: {testObject}.\n Error: {error}.",e.UNEXPECTED_TEST_RUN_ERROR="Unexpected error encountered during test run. Please report this issue to Vest's Github repository.\n Test Object: {testObject}.",e.INCLUDE_SELF="Trying to call include.when on the same field."}(e||(e={})),module.exports=function(n,i={}){const r=function(n){t.invariant(n&&t.hasOwnProperty(n,"valid"),e.PARSER_EXPECT_RESULT_OBJECT);const i=s.suiteSelectors(n),r={},o={invalid:i.hasErrors,pending:i.isPending,tested:function(e){return t.isNullish(e)?t.isPositive(n.testCount):t.hasOwnProperty(r,e)?r[e]:(a(e),o.tested(e))},untested:function(e){return!(t.isPositive(n.testCount)&&o.tested(e))},valid:i.isValid,warning:i.hasWarnings};return o;function a(e){r[e]=t.hasOwnProperty(n.tests,e)&&t.isPositive(n.tests[e].testCount)}}(n);return function(e){const s=[];for(const n in i){const o=n;t.isFunction(r[o])&&r[o](e)&&s.push(i[o])}return s.join(" ")}};
@@ -1,7 +1,6 @@
1
1
  'use strict'
2
-
3
2
  if (process.env.NODE_ENV === 'production') {
4
- module.exports = require('./compose.production.js');
3
+ module.exports = require('./enforce/compose.production.js');
5
4
  } else {
6
- module.exports = require('./compose.development.js');
5
+ module.exports = require('./enforce/compose.development.js');
7
6
  }
@@ -1,7 +1,6 @@
1
1
  'use strict'
2
-
3
2
  if (process.env.NODE_ENV === 'production') {
4
- module.exports = require('./compounds.production.js');
3
+ module.exports = require('./enforce/compounds.production.js');
5
4
  } else {
6
- module.exports = require('./compounds.development.js');
5
+ module.exports = require('./enforce/compounds.development.js');
7
6
  }
@@ -0,0 +1,6 @@
1
+ 'use strict'
2
+ if (process.env.NODE_ENV === 'production') {
3
+ module.exports = require('./enforce/date.production.js');
4
+ } else {
5
+ module.exports = require('./enforce/date.development.js');
6
+ }
@@ -0,0 +1,6 @@
1
+ 'use strict'
2
+ if (process.env.NODE_ENV === 'production') {
3
+ module.exports = require('./enforce/email.production.js');
4
+ } else {
5
+ module.exports = require('./enforce/email.development.js');
6
+ }
@@ -2,10 +2,6 @@
2
2
 
3
3
  var compose = require('n4s/compose');
4
4
 
5
- function _interopDefaultLegacy (e) { return e && typeof e === 'object' && 'default' in e ? e : { 'default': e }; }
6
5
 
7
- var compose__default = /*#__PURE__*/_interopDefaultLegacy(compose);
8
6
 
9
-
10
-
11
- module.exports = compose__default["default"];
7
+ module.exports = compose;
@@ -1 +1 @@
1
- "use strict";function e(e){return e&&"object"==typeof e&&"default"in e?e:{default:e}}var t=e(require("n4s/compose"));module.exports=t.default;
1
+ "use strict";var e=require("n4s/compose");module.exports=e;
@@ -1,11 +1,8 @@
1
1
  'use strict';
2
2
 
3
- Object.defineProperty(exports, '__esModule', { value: true });
4
-
5
3
  var compounds = require('n4s/compounds');
6
4
 
7
- function _interopNamespace(e) {
8
- if (e && e.__esModule) return e;
5
+ function _interopNamespaceDefault(e) {
9
6
  var n = Object.create(null);
10
7
  if (e) {
11
8
  Object.keys(e).forEach(function (k) {
@@ -18,11 +15,11 @@ function _interopNamespace(e) {
18
15
  }
19
16
  });
20
17
  }
21
- n["default"] = e;
18
+ n.default = e;
22
19
  return Object.freeze(n);
23
20
  }
24
21
 
25
- var compounds__namespace = /*#__PURE__*/_interopNamespace(compounds);
22
+ var compounds__namespace = /*#__PURE__*/_interopNamespaceDefault(compounds);
26
23
 
27
24
 
28
25
 
@@ -1 +1 @@
1
- "use strict";function e(e){if(e&&e.__esModule)return e;var r=Object.create(null);return e&&Object.keys(e).forEach((function(t){if("default"!==t){var n=Object.getOwnPropertyDescriptor(e,t);Object.defineProperty(r,t,n.get?n:{enumerable:!0,get:function(){return e[t]}})}})),r.default=e,Object.freeze(r)}Object.defineProperty(exports,"__esModule",{value:!0});var r=e(require("n4s/compounds"));exports.compounds=r;
1
+ "use strict";function e(e){var t=Object.create(null);return e&&Object.keys(e).forEach((function(r){if("default"!==r){var n=Object.getOwnPropertyDescriptor(e,r);Object.defineProperty(t,r,n.get?n:{enumerable:!0,get:function(){return e[r]}})}})),t.default=e,Object.freeze(t)}var t=e(require("n4s/compounds"));exports.compounds=t;
@@ -0,0 +1,26 @@
1
+ 'use strict';
2
+
3
+ var date = require('n4s/date');
4
+
5
+ function _interopNamespaceDefault(e) {
6
+ var n = Object.create(null);
7
+ if (e) {
8
+ Object.keys(e).forEach(function (k) {
9
+ if (k !== 'default') {
10
+ var d = Object.getOwnPropertyDescriptor(e, k);
11
+ Object.defineProperty(n, k, d.get ? d : {
12
+ enumerable: true,
13
+ get: function () { return e[k]; }
14
+ });
15
+ }
16
+ });
17
+ }
18
+ n.default = e;
19
+ return Object.freeze(n);
20
+ }
21
+
22
+ var date__namespace = /*#__PURE__*/_interopNamespaceDefault(date);
23
+
24
+
25
+
26
+ exports.date = date__namespace;
@@ -0,0 +1 @@
1
+ "use strict";function e(e){var t=Object.create(null);return e&&Object.keys(e).forEach((function(r){if("default"!==r){var n=Object.getOwnPropertyDescriptor(e,r);Object.defineProperty(t,r,n.get?n:{enumerable:!0,get:function(){return e[r]}})}})),t.default=e,Object.freeze(t)}var t=e(require("n4s/date"));exports.date=t;
@@ -0,0 +1,26 @@
1
+ 'use strict';
2
+
3
+ var email = require('n4s/email');
4
+
5
+ function _interopNamespaceDefault(e) {
6
+ var n = Object.create(null);
7
+ if (e) {
8
+ Object.keys(e).forEach(function (k) {
9
+ if (k !== 'default') {
10
+ var d = Object.getOwnPropertyDescriptor(e, k);
11
+ Object.defineProperty(n, k, d.get ? d : {
12
+ enumerable: true,
13
+ get: function () { return e[k]; }
14
+ });
15
+ }
16
+ });
17
+ }
18
+ n.default = e;
19
+ return Object.freeze(n);
20
+ }
21
+
22
+ var email__namespace = /*#__PURE__*/_interopNamespaceDefault(email);
23
+
24
+
25
+
26
+ exports.email = email__namespace;
@@ -0,0 +1 @@
1
+ "use strict";function e(e){var t=Object.create(null);return e&&Object.keys(e).forEach((function(r){if("default"!==r){var n=Object.getOwnPropertyDescriptor(e,r);Object.defineProperty(t,r,n.get?n:{enumerable:!0,get:function(){return e[r]}})}})),t.default=e,Object.freeze(t)}var t=e(require("n4s/email"));exports.email=t;
@@ -0,0 +1,26 @@
1
+ 'use strict';
2
+
3
+ var isURL = require('n4s/isURL');
4
+
5
+ function _interopNamespaceDefault(e) {
6
+ var n = Object.create(null);
7
+ if (e) {
8
+ Object.keys(e).forEach(function (k) {
9
+ if (k !== 'default') {
10
+ var d = Object.getOwnPropertyDescriptor(e, k);
11
+ Object.defineProperty(n, k, d.get ? d : {
12
+ enumerable: true,
13
+ get: function () { return e[k]; }
14
+ });
15
+ }
16
+ });
17
+ }
18
+ n.default = e;
19
+ return Object.freeze(n);
20
+ }
21
+
22
+ var isURL__namespace = /*#__PURE__*/_interopNamespaceDefault(isURL);
23
+
24
+
25
+
26
+ exports.isURL = isURL__namespace;
@@ -0,0 +1 @@
1
+ "use strict";function e(e){var t=Object.create(null);return e&&Object.keys(e).forEach((function(r){if("default"!==r){var n=Object.getOwnPropertyDescriptor(e,r);Object.defineProperty(t,r,n.get?n:{enumerable:!0,get:function(){return e[r]}})}})),t.default=e,Object.freeze(t)}var t=e(require("n4s/isURL"));exports.isURL=t;
@@ -1,11 +1,8 @@
1
1
  'use strict';
2
2
 
3
- Object.defineProperty(exports, '__esModule', { value: true });
4
-
5
3
  var schema = require('n4s/schema');
6
4
 
7
- function _interopNamespace(e) {
8
- if (e && e.__esModule) return e;
5
+ function _interopNamespaceDefault(e) {
9
6
  var n = Object.create(null);
10
7
  if (e) {
11
8
  Object.keys(e).forEach(function (k) {
@@ -18,11 +15,11 @@ function _interopNamespace(e) {
18
15
  }
19
16
  });
20
17
  }
21
- n["default"] = e;
18
+ n.default = e;
22
19
  return Object.freeze(n);
23
20
  }
24
21
 
25
- var schema__namespace = /*#__PURE__*/_interopNamespace(schema);
22
+ var schema__namespace = /*#__PURE__*/_interopNamespaceDefault(schema);
26
23
 
27
24
 
28
25
 
@@ -1 +1 @@
1
- "use strict";function e(e){if(e&&e.__esModule)return e;var r=Object.create(null);return e&&Object.keys(e).forEach((function(t){if("default"!==t){var c=Object.getOwnPropertyDescriptor(e,t);Object.defineProperty(r,t,c.get?c:{enumerable:!0,get:function(){return e[t]}})}})),r.default=e,Object.freeze(r)}Object.defineProperty(exports,"__esModule",{value:!0});var r=e(require("n4s/schema"));exports.schema=r;
1
+ "use strict";function e(e){var t=Object.create(null);return e&&Object.keys(e).forEach((function(r){if("default"!==r){var c=Object.getOwnPropertyDescriptor(e,r);Object.defineProperty(t,r,c.get?c:{enumerable:!0,get:function(){return e[r]}})}})),t.default=e,Object.freeze(t)}var t=e(require("n4s/schema"));exports.schema=t;
@@ -0,0 +1,6 @@
1
+ 'use strict'
2
+ if (process.env.NODE_ENV === 'production') {
3
+ module.exports = require('./enforce/isURL.production.js');
4
+ } else {
5
+ module.exports = require('./enforce/isURL.development.js');
6
+ }
@@ -1,16 +1,32 @@
1
1
  'use strict';
2
2
 
3
- Object.defineProperty(exports, '__esModule', { value: true });
4
-
5
- var vestUtils = require('vest-utils');
6
3
  var vest = require('vest');
4
+ var vestUtils = require('vest-utils');
5
+
6
+ var ErrorStrings;
7
+ (function (ErrorStrings) {
8
+ ErrorStrings["HOOK_CALLED_OUTSIDE"] = "hook called outside of a running suite.";
9
+ ErrorStrings["EXPECTED_VEST_TEST"] = "Expected value to be an instance of IsolateTest";
10
+ ErrorStrings["FIELD_NAME_REQUIRED"] = "Field name must be passed";
11
+ ErrorStrings["SUITE_MUST_BE_INITIALIZED_WITH_FUNCTION"] = "Suite must be initialized with a function";
12
+ ErrorStrings["PROMISIFY_REQUIRE_FUNCTION"] = "Vest.Promisify must be called with a function";
13
+ ErrorStrings["PARSER_EXPECT_RESULT_OBJECT"] = "Vest parser: expected argument at position 0 to be Vest's result object.";
14
+ ErrorStrings["WARN_MUST_BE_CALLED_FROM_TEST"] = "Warn must be called from within the body of a test function";
15
+ ErrorStrings["EACH_CALLBACK_MUST_BE_A_FUNCTION"] = "Each must be called with a function";
16
+ ErrorStrings["INVALID_PARAM_PASSED_TO_FUNCTION"] = "Incompatible params passed to {fn_name} function. \"{param}\" must be of type {expected}";
17
+ ErrorStrings["TESTS_CALLED_IN_DIFFERENT_ORDER"] = "Vest Critical Error: Tests called in different order than previous run.\n expected: {fieldName}\n received: {prevName}\n This can happen on one of two reasons:\n 1. You're using if/else statements to conditionally select tests. Instead, use \"skipWhen\".\n 2. You are iterating over a list of tests, and their order changed. Use \"each\" and a custom key prop so that Vest retains their state.";
18
+ ErrorStrings["UNEXPECTED_TEST_REGISTRATION_ERROR"] = "Unexpected error encountered during test registration.\n Please report this issue to Vest's Github repository.\n Test Object: {testObject}.\n Error: {error}.";
19
+ ErrorStrings["UNEXPECTED_TEST_RUN_ERROR"] = "Unexpected error encountered during test run. Please report this issue to Vest's Github repository.\n Test Object: {testObject}.";
20
+ ErrorStrings["INCLUDE_SELF"] = "Trying to call include.when on the same field.";
21
+ })(ErrorStrings || (ErrorStrings = {}));
7
22
 
8
23
  function parse(summary) {
9
- vestUtils.invariant(summary && vestUtils.hasOwnProperty(summary, 'valid'), "Vest parser: expected argument at position 0 to be Vest's result object.");
24
+ vestUtils.invariant(summary && vestUtils.hasOwnProperty(summary, 'valid'), ErrorStrings.PARSER_EXPECT_RESULT_OBJECT);
10
25
  const sel = vest.suiteSelectors(summary);
11
26
  const testedStorage = {};
12
27
  const selectors = {
13
28
  invalid: sel.hasErrors,
29
+ pending: sel.isPending,
14
30
  tested: isTested,
15
31
  untested: isUntested,
16
32
  valid: sel.isValid,
@@ -1,5 +1,4 @@
1
1
  'use strict'
2
-
3
2
  if (process.env.NODE_ENV === 'production') {
4
3
  module.exports = require('./parser.production.js');
5
4
  } else {
@@ -1 +1 @@
1
- "use strict";Object.defineProperty(exports,"__esModule",{value:!0});var t=require("vest-utils"),e=require("vest");exports.parse=function(s){t.invariant(s&&t.hasOwnProperty(s,"valid"),"Vest parser: expected argument at position 0 to be Vest's result object.");const r=e.suiteSelectors(s),i={},n={invalid:r.hasErrors,tested:function(e){if(t.isNullish(e))return t.isPositive(s.testCount);if(t.hasOwnProperty(i,e))return i[e];return o(e),n.tested(e)},untested:function(e){return!(t.isPositive(s.testCount)&&n.tested(e))},valid:r.isValid,warning:r.hasWarnings};return n;function o(e){i[e]=t.hasOwnProperty(s.tests,e)&&t.isPositive(s.tests[e].testCount)}};
1
+ "use strict";var e,t=require("vest"),s=require("vest-utils");!function(e){e.HOOK_CALLED_OUTSIDE="hook called outside of a running suite.",e.EXPECTED_VEST_TEST="Expected value to be an instance of IsolateTest",e.FIELD_NAME_REQUIRED="Field name must be passed",e.SUITE_MUST_BE_INITIALIZED_WITH_FUNCTION="Suite must be initialized with a function",e.PROMISIFY_REQUIRE_FUNCTION="Vest.Promisify must be called with a function",e.PARSER_EXPECT_RESULT_OBJECT="Vest parser: expected argument at position 0 to be Vest's result object.",e.WARN_MUST_BE_CALLED_FROM_TEST="Warn must be called from within the body of a test function",e.EACH_CALLBACK_MUST_BE_A_FUNCTION="Each must be called with a function",e.INVALID_PARAM_PASSED_TO_FUNCTION='Incompatible params passed to {fn_name} function. "{param}" must be of type {expected}',e.TESTS_CALLED_IN_DIFFERENT_ORDER='Vest Critical Error: Tests called in different order than previous run.\n expected: {fieldName}\n received: {prevName}\n This can happen on one of two reasons:\n 1. You\'re using if/else statements to conditionally select tests. Instead, use "skipWhen".\n 2. You are iterating over a list of tests, and their order changed. Use "each" and a custom key prop so that Vest retains their state.',e.UNEXPECTED_TEST_REGISTRATION_ERROR="Unexpected error encountered during test registration.\n Please report this issue to Vest's Github repository.\n Test Object: {testObject}.\n Error: {error}.",e.UNEXPECTED_TEST_RUN_ERROR="Unexpected error encountered during test run. Please report this issue to Vest's Github repository.\n Test Object: {testObject}.",e.INCLUDE_SELF="Trying to call include.when on the same field."}(e||(e={})),exports.parse=function(n){s.invariant(n&&s.hasOwnProperty(n,"valid"),e.PARSER_EXPECT_RESULT_OBJECT);const i=t.suiteSelectors(n),r={},o={invalid:i.hasErrors,pending:i.isPending,tested:function(e){if(s.isNullish(e))return s.isPositive(n.testCount);if(s.hasOwnProperty(r,e))return r[e];return a(e),o.tested(e)},untested:function(e){return!(s.isPositive(n.testCount)&&o.tested(e))},valid:i.isValid,warning:i.hasWarnings};return o;function a(e){r[e]=s.hasOwnProperty(n.tests,e)&&s.isPositive(n.tests[e].testCount)}};
@@ -2,9 +2,26 @@
2
2
 
3
3
  var vestUtils = require('vest-utils');
4
4
 
5
+ var ErrorStrings;
6
+ (function (ErrorStrings) {
7
+ ErrorStrings["HOOK_CALLED_OUTSIDE"] = "hook called outside of a running suite.";
8
+ ErrorStrings["EXPECTED_VEST_TEST"] = "Expected value to be an instance of IsolateTest";
9
+ ErrorStrings["FIELD_NAME_REQUIRED"] = "Field name must be passed";
10
+ ErrorStrings["SUITE_MUST_BE_INITIALIZED_WITH_FUNCTION"] = "Suite must be initialized with a function";
11
+ ErrorStrings["PROMISIFY_REQUIRE_FUNCTION"] = "Vest.Promisify must be called with a function";
12
+ ErrorStrings["PARSER_EXPECT_RESULT_OBJECT"] = "Vest parser: expected argument at position 0 to be Vest's result object.";
13
+ ErrorStrings["WARN_MUST_BE_CALLED_FROM_TEST"] = "Warn must be called from within the body of a test function";
14
+ ErrorStrings["EACH_CALLBACK_MUST_BE_A_FUNCTION"] = "Each must be called with a function";
15
+ ErrorStrings["INVALID_PARAM_PASSED_TO_FUNCTION"] = "Incompatible params passed to {fn_name} function. \"{param}\" must be of type {expected}";
16
+ ErrorStrings["TESTS_CALLED_IN_DIFFERENT_ORDER"] = "Vest Critical Error: Tests called in different order than previous run.\n expected: {fieldName}\n received: {prevName}\n This can happen on one of two reasons:\n 1. You're using if/else statements to conditionally select tests. Instead, use \"skipWhen\".\n 2. You are iterating over a list of tests, and their order changed. Use \"each\" and a custom key prop so that Vest retains their state.";
17
+ ErrorStrings["UNEXPECTED_TEST_REGISTRATION_ERROR"] = "Unexpected error encountered during test registration.\n Please report this issue to Vest's Github repository.\n Test Object: {testObject}.\n Error: {error}.";
18
+ ErrorStrings["UNEXPECTED_TEST_RUN_ERROR"] = "Unexpected error encountered during test run. Please report this issue to Vest's Github repository.\n Test Object: {testObject}.";
19
+ ErrorStrings["INCLUDE_SELF"] = "Trying to call include.when on the same field.";
20
+ })(ErrorStrings || (ErrorStrings = {}));
21
+
5
22
  function promisify(validatorFn) {
6
23
  return (...args) => {
7
- vestUtils.invariant(vestUtils.isFunction(validatorFn), 'promisify: Expected validatorFn to be a function.');
24
+ vestUtils.invariant(vestUtils.isFunction(validatorFn), ErrorStrings.PROMISIFY_REQUIRE_FUNCTION);
8
25
  return new Promise(resolve => validatorFn(...args).done(resolve));
9
26
  };
10
27
  }
@@ -1,5 +1,4 @@
1
1
  'use strict'
2
-
3
2
  if (process.env.NODE_ENV === 'production') {
4
3
  module.exports = require('./promisify.production.js');
5
4
  } else {
@@ -1 +1 @@
1
- "use strict";var e=require("vest-utils");module.exports=function(i){return(...t)=>(e.invariant(e.isFunction(i),"promisify: Expected validatorFn to be a function."),new Promise((e=>i(...t).done(e))))};
1
+ "use strict";var e,t=require("vest-utils");!function(e){e.HOOK_CALLED_OUTSIDE="hook called outside of a running suite.",e.EXPECTED_VEST_TEST="Expected value to be an instance of IsolateTest",e.FIELD_NAME_REQUIRED="Field name must be passed",e.SUITE_MUST_BE_INITIALIZED_WITH_FUNCTION="Suite must be initialized with a function",e.PROMISIFY_REQUIRE_FUNCTION="Vest.Promisify must be called with a function",e.PARSER_EXPECT_RESULT_OBJECT="Vest parser: expected argument at position 0 to be Vest's result object.",e.WARN_MUST_BE_CALLED_FROM_TEST="Warn must be called from within the body of a test function",e.EACH_CALLBACK_MUST_BE_A_FUNCTION="Each must be called with a function",e.INVALID_PARAM_PASSED_TO_FUNCTION='Incompatible params passed to {fn_name} function. "{param}" must be of type {expected}',e.TESTS_CALLED_IN_DIFFERENT_ORDER='Vest Critical Error: Tests called in different order than previous run.\n expected: {fieldName}\n received: {prevName}\n This can happen on one of two reasons:\n 1. You\'re using if/else statements to conditionally select tests. Instead, use "skipWhen".\n 2. You are iterating over a list of tests, and their order changed. Use "each" and a custom key prop so that Vest retains their state.',e.UNEXPECTED_TEST_REGISTRATION_ERROR="Unexpected error encountered during test registration.\n Please report this issue to Vest's Github repository.\n Test Object: {testObject}.\n Error: {error}.",e.UNEXPECTED_TEST_RUN_ERROR="Unexpected error encountered during test run. Please report this issue to Vest's Github repository.\n Test Object: {testObject}.",e.INCLUDE_SELF="Trying to call include.when on the same field."}(e||(e={})),module.exports=function(s){return(...n)=>(t.invariant(t.isFunction(s),e.PROMISIFY_REQUIRE_FUNCTION),new Promise((e=>s(...n).done(e))))};
@@ -1,7 +1,6 @@
1
1
  'use strict'
2
-
3
2
  if (process.env.NODE_ENV === 'production') {
4
- module.exports = require('./schema.production.js');
3
+ module.exports = require('./enforce/schema.production.js');
5
4
  } else {
6
- module.exports = require('./schema.development.js');
5
+ module.exports = require('./enforce/schema.development.js');
7
6
  }