vest 5.0.0-dev-9c596e → 5.0.0-dev-ec989a
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/cjs/classnames.development.js +1 -2
- package/dist/cjs/classnames.production.js +1 -1
- package/dist/cjs/enforce/compose.development.js +1 -5
- package/dist/cjs/enforce/compose.production.js +1 -1
- package/dist/cjs/enforce/compounds.development.js +3 -6
- package/dist/cjs/enforce/compounds.production.js +1 -1
- package/dist/cjs/enforce/schema.development.js +3 -6
- package/dist/cjs/enforce/schema.production.js +1 -1
- package/dist/cjs/parser.development.js +1 -4
- package/dist/cjs/parser.production.js +1 -1
- package/dist/cjs/promisify.development.js +1 -2
- package/dist/cjs/promisify.production.js +1 -1
- package/dist/cjs/vest.development.js +596 -764
- package/dist/cjs/vest.production.js +1 -1
- package/dist/es/classnames.development.js +1 -2
- package/dist/es/classnames.production.js +1 -1
- package/dist/es/parser.development.js +1 -2
- package/dist/es/parser.production.js +1 -1
- package/dist/es/promisify.development.js +1 -2
- package/dist/es/promisify.production.js +1 -1
- package/dist/es/vest.development.js +591 -757
- package/dist/es/vest.production.js +1 -1
- package/dist/umd/classnames.development.js +1 -2
- package/dist/umd/classnames.production.js +1 -1
- package/dist/umd/enforce/compose.development.js +1 -7
- package/dist/umd/enforce/compose.production.js +1 -1
- package/dist/umd/enforce/compounds.development.js +3 -6
- package/dist/umd/enforce/compounds.production.js +1 -1
- package/dist/umd/enforce/schema.development.js +3 -6
- package/dist/umd/enforce/schema.production.js +1 -1
- package/dist/umd/parser.development.js +1 -4
- package/dist/umd/parser.production.js +1 -1
- package/dist/umd/promisify.development.js +1 -2
- package/dist/umd/promisify.production.js +1 -1
- package/dist/umd/vest.development.js +599 -768
- package/dist/umd/vest.production.js +1 -1
- package/package.json +137 -136
- package/testUtils/TVestMock.ts +1 -1
- package/testUtils/asVestTest.ts +9 -0
- package/types/classnames.d.ts +82 -4
- package/types/classnames.d.ts.map +1 -1
- package/types/parser.d.ts +82 -4
- package/types/parser.d.ts.map +1 -1
- package/types/promisify.d.ts +82 -4
- package/types/promisify.d.ts.map +1 -1
- package/types/vest.d.ts +150 -138
- package/types/vest.d.ts.map +1 -1
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,"__esModule",{value:!0});var t,e,n,s,i,r=require("n4s"),o=require("vest-utils"),u=require("context");function a(t,e,n){if(o.isNullish(t.children))return;let s=!1;for(const r of t.children){if(s)return;if((o.isNullish(n)||o.optionalFunctionValue(n,r))&&e(r,i),s)return;a(r,((t,n)=>{e(t,(()=>{n(),i()}))}),n)}function i(){s=!0}}function c(t,e,n){let s=!1;return a(t,((t,n)=>{e(t)&&(n(),s=!0)}),n),s}function l(t,e){let n=t;for(;n.parent;){if(e(n))return n;n=n.parent}return null}!function(t){t[t.Immediate=0]="Immediate",t[t.Delayed=1]="Delayed"}(t||(t={})),function(t){t.HOOK_CALLED_OUTSIDE="hook called outside of a running suite.",t.EXPECTED_VEST_TEST="Expected value to be an instance of IsolateTest",t.FIELD_NAME_REQUIRED="Field name must be passed",t.SUITE_MUST_BE_INITIALIZED_WITH_FUNCTION="Suite must be initialized with a function",t.NO_ACTIVE_ISOLATE="Not within an active isolate",t.PROMISIFY_REQUIRE_FUNCTION="Vest.Promisify must be called with a function",t.PARSER_EXPECT_RESULT_OBJECT="Vest parser: expected argument at position 0 to be Vest's result object.",t.WARN_MUST_BE_CALLED_FROM_TEST="Warn must be called from within the body of a test function",t.EACH_CALLBACK_MUST_BE_A_FUNCTION="Each must be called with a function",t.INVALID_PARAM_PASSED_TO_FUNCTION='Incompatible params passed to {fn_name} function. "{param}" must be of type {expected}',t.ENCOUNTERED_THE_SAME_KEY_TWICE='Encountered the same test key "{key}" twice. This may lead to tests overriding each other\'s results, or to tests being unexpectedly omitted.',t.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.',t.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||(e={})),function(t){t.TEST_RUN_STARTED="test_run_started",t.TEST_COMPLETED="test_completed",t.ALL_RUNNING_TESTS_FINISHED="all_running_tests_finished",t.REMOVE_FIELD="remove_field",t.RESET_FIELD="reset_field",t.RESET_SUITE="reset_suite",t.SUITE_RUN_STARTED="suite_run_started"}(n||(n={}));class d{static reconciler(t,e){return o.isNullish(e),t}static reconcile(t,e){var n;const s=Ot(),i=At();let r=i;s&&(r=null!==(n=null==i?void 0:i.at(Ct()))&&void 0!==n?n:null);const u=this.reconciler(t,r);return o.invariant(u),Object.is(u,t)?[t,E(r,t,e)]:[u,u.output]}static removeAllNextNodesInIsolate(){const t=Ot(),e=At();e&&t&&e.slice(Ct())}static handleCollision(t,e){return t.usesKey()?this.handleIsolateNodeWithKey(t):(this.nodeReorderDetected(t,e)&&this.onNodeReorder(t,e),e||t)}static nodeReorderDetected(t,e){return!(null!=t?t:e)}static onNodeReorder(t,e){return this.removeAllNextNodesInIsolate(),null!=t?t:e}static handleIsolateNodeWithKey(t){o.invariant(t.usesKey());const n=function(t){var e;if(o.isNullish(t))return null;const n=St().historyNode;return null!==(e=null==n?void 0:n.keys[t])&&void 0!==e?e:null}(t.key);let s=t;return o.isNullish(n)||(s=n),function(t,n){if(!t)return;const s=Ot();if(o.invariant(s,e.NO_ACTIVE_ISOLATE),o.isNullish(s.keys[t]))return void(s.keys[t]=n);o.deferThrow(o.text(e.ENCOUNTERED_THE_SAME_KEY_TWICE,{key:t}))}(t.key,t),s}}function E(t,e,n){const s=yt(),i=ht.run(Object.assign({historyNode:t,runtimeNode:e},!s&&{runtimeRoot:e}),(()=>n(e)));return e.output=i,i}class f{constructor(t){this.children=[],this.keys={},this.parent=null,this.key=null,this.allowReorder=!1}setParent(t){return this.parent=t,this}saveOutput(t){return this.output=t,this}setKey(t){return this.key=t,this}usesKey(){return o.isNotNullish(this.key)}addChild(t){o.invariant(this.children),this.children.push(t)}removeChild(t){var e,n;this.children=null!==(n=null===(e=this.children)||void 0===e?void 0:e.filter((e=>e!==t)))&&void 0!==n?n:null}slice(t){o.isNullish(this.children)||(this.children.length=t)}at(t){var e,n;return null!==(n=null===(e=this.children)||void 0===e?void 0:e[t])&&void 0!==n?n:null}cursor(){var t,e;return null!==(e=null===(t=this.children)||void 0===t?void 0:t.length)&&void 0!==e?e:0}shouldAllowReorder(){var t;return null!==(t=!!l(this,(t=>t.allowReorder)))&&void 0!==t&&t}get rootNode(){var t;return null!==(t=l(this,(t=>o.isNullish(t.parent))))&&void 0!==t?t:this}static create(t,e){return this.createImplementation(t,e)}static createImplementation(t,e){const n=Ot(),s=new this(e).setParent(n),[i,r]=this.reconciler.reconcile(s,t);return i.saveOutput(r),this.setNode(i),i}static setNode(t){const n=Ot();n?function(t){const n=Ot();o.invariant(n,e.NO_ACTIVE_ISOLATE),n.addChild(t)}(t):function(t){const e=ht.useX(),[,n]=e.historyRoot();n(t)}(t),t.setParent(n)}static is(t){return t instanceof f}}function N(t,e){return!!e&&!h(t,e)}function h(t,e){return!(!e||t.fieldName!==e)}function T(t,e){return h(t,e.fieldName)&&t.groupName===e.groupName&&t.key===e.key}function R(t){return t===s.ERRORS?i.ERROR_COUNT:i.WARN_COUNT}f.reconciler=d,function(t){t.WARNINGS="warnings",t.ERRORS="errors"}(s||(s={})),function(t){t.ERROR_COUNT="errorCount",t.WARN_COUNT="warnCount"}(i||(i={}));const S=o.bindNot((function(t,e){return t.groupName===e}));function p(t){return function(t,e){return Et.someTests((n=>I(n,t,e)))}(s.ERRORS,t)}function I(t,e,n){return!!t.hasFailures()&&(!N(t,n)&&!function(t,e){return o.either(t===s.WARNINGS,e.warns())}(e,t))}var _;function v(){return function(t){const[e]=D();return e===t}(exports.Modes.EAGER)}exports.Modes=void 0,(_=exports.Modes||(exports.Modes={})).ALL="ALL",_.EAGER="EAGER";const m=u.createCascade(((t,e)=>e?null:o.assign({exclusion:{tests:{},groups:{}},inclusion:{},mode:o.tinyState.createTinyState(exports.Modes.EAGER),testMemoCache:O},t)));function g(t){return m.useX(t).exclusion}function A(){return m.useX().inclusion}function D(){return m.useX().mode()}const O=o.cache(10);var C,y,P,F;class U{constructor(){this.errorCount=0,this.warnCount=0,this.testCount=0}}class L extends U{constructor(){super(...arguments),this[C]=[],this[y]=[],this.groups={},this.tests={},this.valid=!1}}function W(t){return!!Ut(t)||!Et.hasNoTests()&&(!p(t)&&(!function(t){return Et.someIncompleteTests((e=>x(e,t)))}(t)&&function(t){return Et.everyTest((e=>k(e,t)))}(t)))}function G(t,e){return!!Ut(e)||!function(t,e,n){return Et.someTests((s=>!S(s,e)&&I(s,t,n)))}(s.ERRORS,t,e)&&(!function(t,e){return Et.someIncompleteTests((n=>!S(n,t)&&x(n,e)))}(t,e)&&function(t,e){return Et.everyTest((n=>!!S(n,t)||k(n,e)))}(t,e))}function x(t,e){return!N(t,e)&&Ut(e)}function k(e,n){return!!N(e,n)||(function(e){var n;return(null===(n=Pt())||void 0===n?void 0:n.getOptionalField(e.fieldName).type)===t.Delayed&&e.awaitsResolution()}(e)||e.isTested()||e.isOmitted())}function w(){const t=new L;return Et.walkTests((e=>{t.tests=function(t,e){const{fieldName:n}=e,s=Object.assign({},t);return s[n]=b(s[n],e),s[n].valid=!1!==s[n].valid&&W(n),s}(t.tests,e),t.groups=function(t,e){const{groupName:n,fieldName:s}=e;if(!n)return t;const i=Object.assign({},t);return i[n]=i[n]||{},i[n][s]=b(i[n][s],e),i[n][s].valid=!1!==i[n][s].valid&&G(n,s),i}(t.groups,e),t.errors=M(s.ERRORS,t.errors,e),t.warnings=M(s.WARNINGS,t.warnings,e)})),t.valid=W(),function(t){for(const e in t.tests)t.errorCount+=t.tests[e].errorCount,t.warnCount+=t.tests[e].warnCount,t.testCount+=t.tests[e].testCount;return t}(t)}function M(t,e,n){return(t===s.WARNINGS?n.isWarning():n.isFailing())?e.concat({fieldName:n.fieldName,groupName:n.groupName,message:n.message}):e}function b(t,e){const{message:n}=e,i=o.defaultTo(t?Object.assign({},t):null,V);return e.isNonActionable()||(i.testCount++,e.isFailing()?r(s.ERRORS):e.isWarning()&&r(s.WARNINGS)),i;function r(t){const e=R(t);i[e]++,n&&(i[t]=(i[t]||[]).concat(n))}}function V(){return o.assign(new U,{errors:[],warnings:[],valid:!0})}function K(t,e,n){return n?function(t,e,n){var s;return(null===(s=null==t?void 0:t[n])||void 0===s?void 0:s[e])||[]}(t,e,n):function(t,e){const n={},s=R(e);for(const i in t)o.isPositive(t[i][s])&&(n[i]=t[i][e]||[]);return n}(t,e)}function B(t){const e={getError:function(e){return J(s.ERRORS,t,e)},getErrors:function(e){return X(t,s.ERRORS,e)},getErrorsByGroup:function(e,n){return j(t,s.ERRORS,e,n)},getWarning:function(e){return J(s.WARNINGS,t,e)},getWarnings:function(e){return X(t,s.WARNINGS,e)},getWarningsByGroup:function(e,n){return j(t,s.WARNINGS,e,n)},hasErrors:function(e){return Y(t,i.ERROR_COUNT,e)},hasErrorsByGroup:function(e,n){return H(t,i.ERROR_COUNT,e,n)},hasWarnings:function(e){return Y(t,i.WARN_COUNT,e)},hasWarningsByGroup:function(e,n){return H(t,i.WARN_COUNT,e,n)},isValid:function(e){var n;return e?Boolean(null===(n=t.tests[e])||void 0===n?void 0:n.valid):t.valid},isValidByGroup:function(e,n){const s=t.groups[e];if(!s)return!1;if(n)return q(s,n);for(const t in s)if(!q(s,t))return!1;return!0}};return e}function X(t,e,n){return K(t.tests,e,n)}function j(t,e,n,s){return K(t.groups[n],e,s)}function q(t,e){var n;return!!(null===(n=t[e])||void 0===n?void 0:n.valid)}function H(t,e,n,s){var i,r;const u=t.groups[n];if(!u)return!1;if(s)return o.isPositive(null===(i=u[s])||void 0===i?void 0:i[e]);for(const t in u)if(o.isPositive(null===(r=u[t])||void 0===r?void 0:r[e]))return!0;return!1}function Y(t,e,n){var s;const i=n?null===(s=t.tests[n])||void 0===s?void 0:s[e]:t[e]||0;return o.isPositive(i)}function J(t,e,n){var s;const i=e[t];return n?null===(s=i.find((t=>h(t,n))))||void 0===s?void 0:s.message:i[0]}function Q(){const t=w(),e=St().suiteName;return function(t){const e=St().suiteResultCache;return e([Dt()],t)}((()=>o.assign(t,B(t),{suiteName:e})))}function Z(t,e){f.create((()=>{m.run({skipped:z()||o.optionalFunctionValue(t,o.optionalFunctionValue(Q))},e)}))}function z(){return function(){var t;return null!==(t=m.useX().skipped)&&void 0!==t&&t}()}function $(t){return nt(0,"tests",t)}function tt(t){return nt(1,"tests",t)}function et(t){const{fieldName:e,groupName:n}=t;if(z())return!0;const s=g(),i=A(),r=s.tests,u=r[e];if(!1===u)return!0;const a=!0===u;if(n){if(function(t){const e=g(),n=e.groups,s=o.hasOwnProperty(n,t);if(s)return!1===n[t];return it()}(n))return!0;if(!0===s.groups[n])return!a&&(!!st(r)||!1===r[e])}return!!function(t){if(!it())return!1;return!t}(n)||!a&&(!!st(r)&&!o.optionalFunctionValue(i[e]))}function nt(t,n,s){const i=g(e.HOOK_CALLED_OUTSIDE);s&&o.asArray(s).forEach((e=>{o.isStringValue(e)&&(i[n][e]=0===t)}))}function st(t){for(const e in t)if(!0===t[e])return!0;return!1}function it(){const t=g();for(const e in t.groups)if(t.groups[e])return!0;return!1}function rt(t,e){f.create((()=>{m.run({omitted:ot()||o.optionalFunctionValue(t,o.optionalFunctionValue(Q))},e)}))}function ot(){return function(){var t;return null!==(t=m.useX().omitted)&&void 0!==t&&t}()}function ut(t,e=t){return function(t){return v()&&p(t.fieldName)}(t)?((n=t).skip(),n):function(t){return ot()||Ut(t.fieldName)}(t)?function(t){return t.omit(),t}(t):et(t)?function(t){return t.skip(z()),t}(e):t;var n}C=s.ERRORS,y=s.WARNINGS,$.group=function(t){return nt(0,"groups",t)},tt.group=function(t){return nt(1,"groups",t)};function at(){return function(t){let e=t.initial;return{getState:function(){return e},transition:function(n,s){let i=t.states[e][n];if(Array.isArray(i)){const[,t]=i;if(!t(s))return;i=i[0]}i&&i!==e&&(e=i)}}}(ct)}!function(t){t.UNTESTED="UNTESTED",t.SKIPPED="SKIPPED",t.FAILED="FAILED",t.WARNING="WARNING",t.PASSING="PASSING",t.PENDING="PENDING",t.CANCELED="CANCELED",t.OMITTED="OMITTED"}(P||(P={})),function(t){t.RESET="RESET"}(F||(F={}));const ct={initial:P.UNTESTED,states:{[P.UNTESTED]:{[P.CANCELED]:P.CANCELED,[P.FAILED]:P.FAILED,[P.OMITTED]:P.OMITTED,[P.PASSING]:P.PASSING,[P.PENDING]:P.PENDING,[P.SKIPPED]:P.SKIPPED,[P.WARNING]:P.WARNING},[P.SKIPPED]:{[F.RESET]:P.UNTESTED},[P.FAILED]:{[F.RESET]:P.UNTESTED},[P.WARNING]:{[F.RESET]:P.UNTESTED},[P.PASSING]:{[F.RESET]:P.UNTESTED},[P.PENDING]:{[F.RESET]:P.UNTESTED,[P.CANCELED]:P.CANCELED,[P.FAILED]:P.FAILED,[P.OMITTED]:P.OMITTED,[P.PASSING]:P.PASSING,[P.SKIPPED]:[P.SKIPPED,t=>!0===t],[P.WARNING]:P.WARNING},[P.CANCELED]:{[F.RESET]:P.UNTESTED},[P.OMITTED]:{[F.RESET]:P.UNTESTED}}};class lt extends f{constructor({fieldName:t,testFn:e,message:n,groupName:s,key:i=null}){super(),this.children=null,this.id=o.seq(),this.severity=dt.Error,this.stateMachine=at(),this.fieldName=t,this.testFn=e,s&&(this.groupName=s),n&&(this.message=n),this.setKey(i)}static create(t,e){return lt.cast(super.create(t,e))}static cast(t){return lt.isX(t),t}get status(){return this.stateMachine.getState()}setStatus(t,e){this.stateMachine.transition(t,e)}run(){let t;try{t=this.testFn()}catch(e){(function(t,e){return o.isUndefined(t)&&o.isStringValue(e)})(this.message,e)&&(this.message=e),t=!1}return!1===t&&this.fail(),t}warns(){return this.severity===dt.Warning}isPending(){return this.statusEquals(P.PENDING)}isOmitted(){return this.statusEquals(P.OMITTED)}isUntested(){return this.statusEquals(P.UNTESTED)}isFailing(){return this.statusEquals(P.FAILED)}isCanceled(){return this.statusEquals(P.CANCELED)}isSkipped(){return this.statusEquals(P.SKIPPED)}isPassing(){return this.statusEquals(P.PASSING)}isWarning(){return this.statusEquals(P.WARNING)}hasFailures(){return this.isFailing()||this.isWarning()}isNonActionable(){return this.isSkipped()||this.isOmitted()||this.isCanceled()}isTested(){return this.hasFailures()||this.isPassing()}awaitsResolution(){return this.isSkipped()||this.isUntested()||this.isPending()}statusEquals(t){return this.status===t}setPending(){this.setStatus(P.PENDING)}fail(){this.setStatus(this.warns()?P.WARNING:P.FAILED)}pass(){this.setStatus(P.PASSING)}warn(){this.severity=dt.Warning}skip(t){this.setStatus(P.SKIPPED,t)}cancel(){this.setStatus(P.CANCELED)}reset(){this.stateMachine.transition(F.RESET)}omit(){this.setStatus(P.OMITTED)}valueOf(){return!this.isFailing()}isAsyncTest(){return o.isPromise(this.asyncTest)}static is(t){return t instanceof lt}static isX(t){o.invariant(this.is(t))}}var dt;lt.reconciler=class extends d{static reconciler(t,e){if(!lt.is(t))return t;if(o.isNullish(e))return this.handleNoHistoryNode(t);if(!lt.is(e))return t;const n=this.pickNode(e,t);return function(t,e,n){t===e&<.is(e)&&(i=e)!==(s=n)&&T(s,i)&&s.isPending()&&s.cancel();var s,i}(n,t,e),n}static nodeReorderDetected(t,e){return!!lt.is(e)&&!T(e,t)}static handleCollision(t,e){return t.usesKey()?lt.cast(this.handleIsolateNodeWithKey(t)):this.nodeReorderDetected(t,e)?this.onNodeReorder(t,e):lt.cast(e||t)}static onNodeReorder(t,n){return function(t,n){if(t.shouldAllowReorder())return;o.deferThrow(o.text(e.TESTS_CALLED_IN_DIFFERENT_ORDER,{fieldName:t.fieldName,prevName:lt.is(n)?n.fieldName:void 0}))}(t,n),this.removeAllNextNodesInIsolate(),t}static pickNode(t,e){return ut(e,this.handleCollision(e,t))}static handleNoHistoryNode(t){return t.usesKey()?lt.cast(this.handleIsolateNodeWithKey(t)):t}},function(t){t.Error="error",t.Warning="warning"}(dt||(dt={}));class Et{static defaultRoot(){return Pt()}static hasNoTests(t=Et.defaultRoot()){return!t||(e=t,n=lt.is,!c(e,(()=>!0),n));var e,n}static someIncompleteTests(t,e=Et.defaultRoot()){return!!e&&c(e,(e=>(lt.isX(e),e.isPending()&&t(e))),lt.is)}static someTests(t,e=Et.defaultRoot()){return!!e&&c(e,(e=>(lt.isX(e),t(e))),lt.is)}static everyTest(t,e=Et.defaultRoot()){return!!e&&function(t,e,n){let s=!0;return a(t,((t,n)=>{e(t)||(n(),s=!1)}),n),s}(e,(e=>(lt.isX(e),t(e))),lt.is)}static walkTests(t,e=Et.defaultRoot()){e&&a(e,((e,n)=>{t(lt.cast(e),n)}),lt.is)}static hasRemainingTests(t){return Et.someIncompleteTests((e=>!t||h(e,t)))}static pluckTests(t,e=Et.defaultRoot()){e&&function(t,e,n){a(t,(t=>{e(t)&&t.parent&&t.parent.removeChild(t)}),n)}(e,(e=>(lt.isX(e),t(e))),lt.is)}static resetField(t){Et.walkTests((e=>{h(e,t)&&e.reset()}),Et.defaultRoot())}static removeTestByFieldName(t,e=Et.defaultRoot()){Et.pluckTests((e=>h(e,t)),e)}}function ft(){const t=o.bus.createBus();return e(n.TEST_COMPLETED,(e=>{e.isCanceled()||(!function(t){const[e]=mt();t&&!Et.hasRemainingTests(t)&&o.isArray(e[t])&&o.callEach(e[t])}(e.fieldName),Et.hasRemainingTests()||t.emit(n.ALL_RUNNING_TESTS_FINISHED))})),e(n.TEST_RUN_STARTED,(()=>{})),e(n.ALL_RUNNING_TESTS_FINISHED,(()=>{!function(){const[t]=vt();o.callEach(t)}()})),e(n.RESET_FIELD,(t=>{Et.resetField(t)})),e(n.SUITE_RUN_STARTED,(()=>{Rt()})),e(n.REMOVE_FIELD,(t=>{Et.removeTestByFieldName(t)})),e(n.RESET_SUITE,(()=>{!function(){Rt();const[,,t]=gt();t()}()})),t;function e(e,n){t.on(e,((...t)=>{!function(){const t=St().suiteResultCache;t.invalidate([Dt()])}(),n(...t)}))}}const Nt=o.cache(),ht=u.createCascade(((t,e)=>{if(e)return null;o.invariant(t.historyRoot);const[n]=t.historyRoot(),s={};return o.assign(s,{historyNode:n,runtimeNode:null,runtimeRoot:null},t),s}));function Tt(t){const e=ht.useX();return function(...n){var s;const i=null!==(s=ht.use())&&void 0!==s?s:e;return ht.run(i,(()=>t(...n)))}}function Rt(){const[,,t]=vt(),[,,e]=mt();t(),e()}function St(){return ht.useX()}function pt(){return St().VestBus}function It(){return Tt(pt().emit)}function _t(t){const e=It();return n=>e(t,n)}function vt(){return St().doneCallbacks()}function mt(){return St().fieldCallbacks()}function gt(){return St().historyRoot()}function At(){return St().historyNode}function Dt(){return St().suiteId}function Ot(){var t;return null!==(t=St().runtimeNode)&&void 0!==t?t:null}function Ct(){var t,e;return null!==(e=null===(t=Ot())||void 0===t?void 0:t.cursor())&&void 0!==e?e:0}function yt(){return St().runtimeRoot}function Pt(){const t=yt();if(t)return t;const[e]=gt();return e}function Ft(e){const n=yt();if(o.isArray(e)||o.isStringValue(e))o.asArray(e).forEach((e=>{n.setOptionalField(e,(()=>({type:t.Delayed,applied:!1,rule:null})))}));else for(const s in e){const i=e[s];n.setOptionalField(s,(()=>({type:t.Immediate,rule:i,applied:o.optionalFunctionValue(i)})))}}function Ut(t){var e,n,s;return!!t&&(null!==(s=null===(n=null===(e=Pt())||void 0===e?void 0:e.getOptionalField(t))||void 0===n?void 0:n.applied)&&void 0!==s&&s)}class Lt extends f{constructor(){super(...arguments),this.optional={}}setOptionalField(t,e){const n=this.optional,s=n[t];Object.assign(n,{[t]:Object.assign({},s,e(s))})}getOptionalField(t){var e;return null!==(e=this.optional[t])&&void 0!==e?e:{}}}function Wt(t){const e=A(),n=g();return o.invariant(o.isStringValue(t)),e[t]=o.defaultTo(n.tests[t],!0),{when:function(e){const n=A(),s=g();n[t]=()=>o.hasOwnProperty(s.tests,t)?o.defaultTo(s.tests[t],!0):o.isStringValue(e)?Boolean(s.tests[e]):o.optionalFunctionValue(e,o.optionalFunctionValue(Q))}}}function Gt(t){ut(t),t.isNonActionable()||(t.isUntested()?function(t){const n=pt(),s=function(t){return m.run({currentTest:t},(()=>t.run()))}(t);try{o.isPromise(s)?(t.asyncTest=s,t.setPending(),xt(t)):kt(n,t)}catch(n){throw new Error(o.text(e.UNEXPECTED_TEST_REGISTRATION_ERROR,{testObject:JSON.stringify(t),error:n}))}}(t):t.isAsyncTest()&&(t.setPending(),xt(t)))}function xt(t){const{asyncTest:e,message:n}=t;if(!o.isPromise(e))return;const s=pt(),i=Tt((()=>{kt(s,t)})),r=Tt((e=>{t.isCanceled()||(t.message=o.isStringValue(e)?e:n,t.fail(),i())}));e.then(i,r)}function kt(t,e){e.pass(),t.emit(n.TEST_COMPLETED,e)}function wt(t,...s){const[i,r,u]=o.isFunction(s[1])?s:[void 0,...s];!function(t,n){const s="test";o.invariant(o.isStringValue(t),o.text(e.INVALID_PARAM_PASSED_TO_FUNCTION,{fn_name:s,param:"fieldName",expected:"string"})),o.invariant(o.isFunction(n),o.text(e.INVALID_PARAM_PASSED_TO_FUNCTION,{fn_name:s,param:"callback",expected:"function"}))}(t,r);const a={fieldName:t,groupName:m.useX().groupName,key:u,message:i,testFn:r};return It()(n.TEST_RUN_STARTED),lt.create(Gt,a)}const Mt=o.assign(wt,{memo:function(t){return function(e,...n){const[s,i,r]=n.reverse();return function(t,e){const n=m.useX().testMemoCache,s=n.get(t);if(o.isNull(s))return n(t,e);const[,i]=s;if(i.isCanceled())return n.invalidate(t),n(t,e);return lt.setNode(i),i}([Dt(),e,Ct()].concat(s),(function(){return t(e,r,i)}))}}(wt)});function bt(){return{group:jt,include:Wt,omitWhen:rt,only:$,optional:Ft,skip:tt,skipWhen:Z,test:Mt}}function Vt(){return o.assign({},Q(),{done:Tt(Kt)})}function Kt(...t){const[e,n]=t.reverse(),s=Vt();if(function(t,e,n){var s;return!!(!o.isFunction(t)||e&&o.numberEquals(null===(s=n.tests[e])||void 0===s?void 0:s.testCount,0))}(e,n,s))return s;const i=()=>e(Q());return Et.hasRemainingTests(n)?(function(t,e){const[,n]=mt(),[,s]=vt();e?n((n=>o.assign(n,{[e]:(n[e]||[]).concat(t)}))):s((e=>e.concat(t)))}(i,n),s):(i(),s)}function Bt(...t){const[s,i]=t.reverse();!function(t){o.invariant(o.isFunction(t),e.SUITE_MUST_BE_INITIALIZED_WITH_FUNCTION)}(s);const r=function({suiteName:t}={}){return{VestBus:ft(),doneCallbacks:o.tinyState.createTinyState((()=>[])),fieldCallbacks:o.tinyState.createTinyState((()=>({}))),historyRoot:o.tinyState.createTinyState(null),suiteId:o.seq(),suiteName:t,suiteResultCache:Nt}}({suiteName:i});function u(...t){return m.run({},(()=>(It()(n.SUITE_RUN_STARTED),Lt.create(function(t,...e){return()=>(t(...e),Vt())}(s,...t))))).output}return ht.run(r,(()=>o.assign(ht.bind(r,u),Object.assign({get:Tt(Q),remove:_t(n.REMOVE_FIELD),reset:_t(n.RESET_SUITE),resetField:_t(n.RESET_FIELD)},bt()))))}class Xt extends f{constructor(){super(...arguments),this.allowReorder=!0}}function jt(t,e){return f.create((()=>{m.run({groupName:t},e)}))}const qt=e.WARN_MUST_BE_CALLED_FROM_TEST;Object.defineProperty(exports,"enforce",{enumerable:!0,get:function(){return r.enforce}}),exports.create=Bt,exports.each=function(t,n){o.invariant(o.isFunction(n),e.EACH_CALLBACK_MUST_BE_A_FUNCTION),Xt.create((()=>{t.forEach(((t,e)=>{n(t,e)}))}))},exports.group=jt,exports.include=Wt,exports.mode=function(t){const[,e]=D();e(t)},exports.omitWhen=rt,exports.only=$,exports.optional=Ft,exports.skip=tt,exports.skipWhen=Z,exports.staticSuite=function(t){return o.assign(((...e)=>Bt(t)(...e)),Object.assign({},bt()))},exports.suiteSelectors=B,exports.test=Mt,exports.warn=function(){const t=(n=e.HOOK_CALLED_OUTSIDE,m.useX(n).currentTest);var n;o.invariant(t,qt),t.warn()};
|
|
1
|
+
"use strict";var t,e,n=require("n4s"),s=require("vest-runtime"),i=require("vest-utils"),r=require("context");function o(e){const n=s.VestRuntime.useAvailableRoot();if(i.isArray(e)||i.isStringValue(e))i.asArray(e).forEach((e=>{n.setOptionalField(e,(()=>({type:t.AUTO,applied:!1,rule:null})))}));else for(const s in e){const i=e[s];n.setOptionalField(s,(()=>({type:t.CUSTOM_LOGIC,rule:i,applied:!0===i})))}}function u(t){var e,n,i;return!!t&&(null!==(i=null===(n=null===(e=s.VestRuntime.useAvailableRoot())||void 0===e?void 0:e.getOptionalField(t))||void 0===n?void 0:n.applied)&&void 0!==i&&i)}!function(t){t[t.CUSTOM_LOGIC=0]="CUSTOM_LOGIC",t[t.AUTO=1]="AUTO"}(t||(t={})),function(t){t.TEST_RUN_STARTED="test_run_started",t.TEST_COMPLETED="test_completed",t.ALL_RUNNING_TESTS_FINISHED="all_running_tests_finished",t.REMOVE_FIELD="remove_field",t.RESET_FIELD="reset_field",t.RESET_SUITE="reset_suite",t.SUITE_RUN_STARTED="suite_run_started",t.SUITE_CALLBACK_RUN_FINISHED="SUITE_CALLBACK_RUN_FINISHED",t.DONE_TEST_OMISSION_PASS="DONE_TEST_OMISSION_PASS"}(e||(e={}));class a extends s.Isolate{constructor(){super(...arguments),this.optional={}}setOptionalField(t,e){const n=this.optional,s=n[t];Object.assign(n,{[t]:Object.assign({},s,e(s))})}getOptionalField(t){var e;return null!==(e=this.optional[t])&&void 0!==e?e:{}}getOptionalFields(){return this.optional}}const c=i.cache();function l(){return s.VestRuntime.useXAppData()}function E(){return l().doneCallbacks()}function f(){return l().fieldCallbacks()}function N(){return l().suiteId}function d(){const[,,t]=E(),[,,e]=f();t(),e()}var T,R,S,p,I,m;function _(t){return t===T.ERRORS?R.ERROR_COUNT:R.WARN_COUNT}function g(t,e){return!!e&&!h(t,e)}function h(t,e){return!(!e||t.fieldName!==e)}function O(t,e){return h(t,e.fieldName)&&t.groupName===e.groupName&&t.key===e.key}!function(t){t.WARNINGS="warnings",t.ERRORS="errors"}(T||(T={})),function(t){t.ERROR_COUNT="errorCount",t.WARN_COUNT="warnCount"}(R||(R={})),function(t){t.Error="error",t.Warning="warning"}(S||(S={})),function(t){t.HOOK_CALLED_OUTSIDE="hook called outside of a running suite.",t.EXPECTED_VEST_TEST="Expected value to be an instance of IsolateTest",t.FIELD_NAME_REQUIRED="Field name must be passed",t.SUITE_MUST_BE_INITIALIZED_WITH_FUNCTION="Suite must be initialized with a function",t.PROMISIFY_REQUIRE_FUNCTION="Vest.Promisify must be called with a function",t.PARSER_EXPECT_RESULT_OBJECT="Vest parser: expected argument at position 0 to be Vest's result object.",t.WARN_MUST_BE_CALLED_FROM_TEST="Warn must be called from within the body of a test function",t.EACH_CALLBACK_MUST_BE_A_FUNCTION="Each must be called with a function",t.INVALID_PARAM_PASSED_TO_FUNCTION='Incompatible params passed to {fn_name} function. "{param}" must be of type {expected}',t.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.',t.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}.",t.UNEXPECTED_TEST_RUN_ERROR="Unexpected error encountered during test run. Please report this issue to Vest's Github repository.\n Test Object: {testObject}."}(p||(p={}));class A{constructor(){this.errorCount=0,this.warnCount=0,this.testCount=0}}class v extends A{constructor(){super(...arguments),this[I]=[],this[m]=[],this.groups={},this.tests={},this.valid=!1}}I=T.ERRORS,m=T.WARNINGS;class D{constructor(t,e,n){this.fieldName=t,this.message=e,this.groupName=n}static fromTestObject(t){return new D(t.fieldName,t.message,t.groupName)}toString(){return this.message||""}}const C=i.bindNot((function(t,e){return t.groupName===e}));function P(t){return!!u(t)||!ot.hasNoTests()&&(!ut(t)&&(!function(t){return ot.someIncompleteTests((e=>!g(e,t)&&!u(t)))}(t)&&function(t){return ot.everyTest((e=>U(e,t)))}(t)))}function F(t,e){return!!u(e)||!function(t,e,n){return ot.someTests((s=>!C(s,e)&&at(s,t,n)))}(T.ERRORS,t,e)&&(!function(t,e){return ot.someIncompleteTests((n=>!C(n,t)&&(!g(n,e)&&!u(e))))}(t,e)&&function(t,e){return ot.everyTest((n=>!!C(n,t)||U(n,e)))}(t,e))}function U(e,n){return!!g(e,n)||(e.isOmitted()||e.isTested()||function(e){var n;return(null===(n=s.VestRuntime.useAvailableRoot())||void 0===n?void 0:n.getOptionalField(e.fieldName).type)===t.AUTO&&e.awaitsResolution()}(e))}function L(){const t=new v;return ot.walkTests((e=>{t.tests=function(t,e){const{fieldName:n}=e,s=Object.assign({},t);return s[n]=G(s[n],e),s[n].valid=!1!==s[n].valid&&P(n),s}(t.tests,e),t.groups=function(t,e){const{groupName:n,fieldName:s}=e;if(!n)return t;const i=Object.assign({},t);return i[n]=i[n]||{},i[n][s]=G(i[n][s],e),i[n][s].valid=!1!==i[n][s].valid&&F(n,s),i}(t.groups,e),t.errors=y(T.ERRORS,t.errors,e),t.warnings=y(T.WARNINGS,t.warnings,e)})),t.valid=P(),function(t){for(const e in t.tests)t.errorCount+=t.tests[e].errorCount,t.warnCount+=t.tests[e].warnCount,t.testCount+=t.tests[e].testCount;return t}(t)}function y(t,e,n){if(n.isOmitted())return e;return(t===T.WARNINGS?n.isWarning():n.isFailing())?e.concat(D.fromTestObject(n)):e}function G(t,e){const{message:n}=e,s=i.defaultTo(t?Object.assign({},t):null,W);return e.isNonActionable()||(s.testCount++,e.isFailing()?r(T.ERRORS):e.isWarning()&&r(T.WARNINGS)),s;function r(t){const e=_(t);s[e]++,n&&(s[t]=(s[t]||[]).concat(n))}}function W(){return i.assign(new A,{errors:[],warnings:[],valid:!0})}function V(t,e,n){return n?function(t,e,n){var s;return(null===(s=null==t?void 0:t[n])||void 0===s?void 0:s[e])||[]}(t,e,n):function(t,e){const n={},s=_(e);for(const r in t)i.isPositive(t[r][s])&&(n[r]=t[r][e]||[]);return n}(t,e)}function b(t){const e={getError:function(e){return K(T.ERRORS,t,e)},getErrors:function(e){return M(t,T.ERRORS,e)},getErrorsByGroup:function(e,n){return x(t,T.ERRORS,e,n)},getWarning:function(e){return K(T.WARNINGS,t,e)},getWarnings:function(e){return M(t,T.WARNINGS,e)},getWarningsByGroup:function(e,n){return x(t,T.WARNINGS,e,n)},hasErrors:function(e){return B(t,R.ERROR_COUNT,e)},hasErrorsByGroup:function(e,n){return k(t,R.ERROR_COUNT,e,n)},hasWarnings:function(e){return B(t,R.WARN_COUNT,e)},hasWarningsByGroup:function(e,n){return k(t,R.WARN_COUNT,e,n)},isValid:function(e){var n;return e?Boolean(null===(n=t.tests[e])||void 0===n?void 0:n.valid):t.valid},isValidByGroup:function(e,n){const s=t.groups[e];if(!s)return!1;if(n)return w(s,n);for(const t in s)if(!w(s,t))return!1;return!0}};return e}function M(t,e,n){return V(t.tests,e,n)}function x(t,e,n,s){return V(t.groups[n],e,s)}function w(t,e){var n;return!!(null===(n=t[e])||void 0===n?void 0:n.valid)}function k(t,e,n,s){var r,o;const u=t.groups[n];if(!u)return!1;if(s)return i.isPositive(null===(r=u[s])||void 0===r?void 0:r[e]);for(const t in u)if(i.isPositive(null===(o=u[t])||void 0===o?void 0:o[e]))return!0;return!1}function B(t,e,n){var s;const r=n?null===(s=t.tests[n])||void 0===s?void 0:s[e]:t[e]||0;return i.isPositive(r)}function K(t,e,n){var s;const i=e[t];return n?null===(s=i.find((t=>h(t,n))))||void 0===s?void 0:s.message:i[0]}function j(){return t=()=>{const t=L(),e=l().suiteName;return Object.freeze(i.assign(t,b(t),{suiteName:e}))},(0,l().suiteResultCache)([N()],t);var t}function X(t,e){s.Isolate.create((()=>{Et.run({skipped:q()||i.optionalFunctionValue(t,i.optionalFunctionValue(j))},e)}))}function q(){return function(){var t;return null!==(t=Et.useX().skipped)&&void 0!==t&&t}()}function H(t){return Y(0,"tests",t)}function z(t){return Y(1,"tests",t)}function J(t){const{fieldName:e,groupName:n}=t;if(q())return!0;const s=ft(),r=Nt(),o=s.tests,u=o[e];if(!1===u)return!0;const a=!0===u;if(n){if(function(t){const e=ft().groups;if(i.hasOwnProperty(e,t))return!1===e[t];return Z()}(n))return!0;if(!0===s.groups[n])return!a&&(!!Q(o)||!1===o[e])}return!!function(t){if(!Z())return!1;return!t}(n)||!a&&(!!Q(o)&&!i.optionalFunctionValue(r[e]))}function Y(t,e,n){const s=ft(p.HOOK_CALLED_OUTSIDE);n&&i.asArray(n).forEach((n=>{i.isStringValue(n)&&(s[e][n]=0===t)}))}function Q(t){for(const e in t)if(!0===t[e])return!0;return!1}function Z(){const t=ft();for(const e in t.groups)if(t.groups[e])return!0;return!1}function $(t,e){s.Isolate.create((()=>{Et.run({omitted:tt()||i.optionalFunctionValue(t,i.optionalFunctionValue(j))},e)}))}function tt(){return function(){var t;return null!==(t=Et.useX().omitted)&&void 0!==t&&t}()}function et(t,e=t){return function(t){if(lt(exports.Modes.ONE))return ut();if(lt(exports.Modes.EAGER))return ut(t.fieldName);return!1}(t)?((n=t).skip(),n):function(t){return tt()||u(t.fieldName)}(t)?function(t){return t.omit(),t}(t):J(t)?function(t){return t.skip(q()),t}(e):t;var n}var nt,st;H.group=function(t){return Y(0,"groups",t)},z.group=function(t){return Y(1,"groups",t)},function(t){t.UNTESTED="UNTESTED",t.SKIPPED="SKIPPED",t.FAILED="FAILED",t.WARNING="WARNING",t.PASSING="PASSING",t.PENDING="PENDING",t.CANCELED="CANCELED",t.OMITTED="OMITTED"}(nt||(nt={})),function(t){t.RESET="RESET"}(st||(st={}));const it={initial:nt.UNTESTED,states:{"*":{[nt.OMITTED]:nt.OMITTED,[st.RESET]:nt.UNTESTED},[nt.UNTESTED]:{[nt.CANCELED]:nt.CANCELED,[nt.FAILED]:nt.FAILED,[nt.PASSING]:nt.PASSING,[nt.PENDING]:nt.PENDING,[nt.SKIPPED]:nt.SKIPPED,[nt.WARNING]:nt.WARNING},[nt.PENDING]:{[nt.CANCELED]:nt.CANCELED,[nt.FAILED]:nt.FAILED,[nt.PASSING]:nt.PASSING,[nt.SKIPPED]:[nt.SKIPPED,t=>!0===t],[nt.WARNING]:nt.WARNING},[nt.SKIPPED]:{},[nt.FAILED]:{},[nt.WARNING]:{},[nt.PASSING]:{},[nt.CANCELED]:{},[nt.OMITTED]:{}}};class rt extends s.Isolate{constructor({fieldName:t,testFn:e,message:n,groupName:s,key:r=null}){super(),this.children=null,this.id=i.seq(),this.severity=S.Error,this.stateMachine=i.StateMachine(it),this.fieldName=t,this.testFn=e,s&&(this.groupName=s),n&&(this.message=n),this.setKey(r)}static create(t,e){return rt.cast(super.create(t,e))}static cast(t){return rt.isX(t),t}get status(){return this.stateMachine.getState()}setStatus(t,e){this.stateMachine.transition(t,e)}run(){let t;try{t=this.testFn()}catch(e){(function(t,e){return i.isUndefined(t)&&i.isStringValue(e)})(this.message,e)&&(this.message=e),t=!1}return!1===t&&this.fail(),t}warns(){return this.severity===S.Warning}isPending(){return this.statusEquals(nt.PENDING)}isOmitted(){return this.statusEquals(nt.OMITTED)}isUntested(){return this.statusEquals(nt.UNTESTED)}isFailing(){return this.statusEquals(nt.FAILED)}isCanceled(){return this.statusEquals(nt.CANCELED)}isSkipped(){return this.statusEquals(nt.SKIPPED)}isPassing(){return this.statusEquals(nt.PASSING)}isWarning(){return this.statusEquals(nt.WARNING)}hasFailures(){return this.isFailing()||this.isWarning()}isNonActionable(){return this.isSkipped()||this.isOmitted()||this.isCanceled()}isTested(){return this.hasFailures()||this.isPassing()}awaitsResolution(){return this.isSkipped()||this.isUntested()||this.isPending()}statusEquals(t){return this.status===t}setPending(){this.setStatus(nt.PENDING)}fail(){this.setStatus(this.warns()?nt.WARNING:nt.FAILED)}pass(){this.setStatus(nt.PASSING)}warn(){this.severity=S.Warning}skip(t){this.setStatus(nt.SKIPPED,t)}cancel(){this.setStatus(nt.CANCELED)}reset(){this.stateMachine.transition(st.RESET)}omit(){this.setStatus(nt.OMITTED)}valueOf(){return!this.isFailing()}isAsyncTest(){return i.isPromise(this.asyncTest)}static is(t){return t instanceof rt}static isX(t){i.invariant(this.is(t))}}rt.reconciler=function(t,e){if(!rt.is(t))return t;if(i.isNullish(e))return function(t){if(t.usesKey())return rt.cast(s.Reconciler.handleIsolateNodeWithKey(t));return t}(t);if(!rt.is(e))return t;const n=function(t,e){const n=function(t,e){if(t.usesKey())return rt.cast(s.Reconciler.handleIsolateNodeWithKey(t));if(function(t,e){return!!rt.is(e)&&!O(e,t)}(t,e))return function(t,e){return function(t,e){if(t.shouldAllowReorder())return;i.deferThrow(i.text(p.TESTS_CALLED_IN_DIFFERENT_ORDER,{fieldName:t.fieldName,prevName:rt.is(e)?e.fieldName:void 0}))}(t,e),s.Reconciler.removeAllNextNodesInIsolate(),t}(t,e);if(!rt.is(e))return t;if(e.isOmitted())return t;return e}(e,t);return et(e,n)}(e,t);return function(t,e,n){t===e&&rt.is(e)&&(i=e)!==(s=n)&&O(s,i)&&s.isPending()&&s.cancel();var s,i}(n,t,e),n};class ot{static defaultRoot(){return s.VestRuntime.useAvailableRoot()}static hasNoTests(t=ot.defaultRoot()){return!t||!s.Walker.has(t,rt.is)}static someIncompleteTests(t,e=ot.defaultRoot()){return!!e&&s.Walker.some(e,(e=>(rt.isX(e),e.isPending()&&t(e))),rt.is)}static someTests(t,e=ot.defaultRoot()){return!!e&&s.Walker.some(e,(e=>(rt.isX(e),t(e))),rt.is)}static everyTest(t,e=ot.defaultRoot()){return!!e&&s.Walker.every(e,(e=>(rt.isX(e),t(e))),rt.is)}static walkTests(t,e=ot.defaultRoot()){e&&s.Walker.walk(e,((e,n)=>{t(rt.cast(e),n)}),rt.is)}static hasRemainingTests(t){return ot.someIncompleteTests((e=>!t||h(e,t)))}static pluckTests(t,e=ot.defaultRoot()){e&&s.Walker.pluck(e,(e=>(rt.isX(e),t(e))),rt.is)}static resetField(t){ot.walkTests((e=>{h(e,t)&&e.reset()}),ot.defaultRoot())}static removeTestByFieldName(t,e=ot.defaultRoot()){ot.pluckTests((e=>h(e,t)),e)}}function ut(t){return function(t,e){return ot.someTests((n=>at(n,t,e)))}(T.ERRORS,t)}function at(t,e,n){return!!t.hasFailures()&&(!g(t,n)&&!function(t,e){return i.either(t===T.WARNINGS,e.warns())}(e,t))}var ct;function lt(t){const[e]=dt();return e===t}exports.Modes=void 0,(ct=exports.Modes||(exports.Modes={})).EAGER="EAGER",ct.ALL="ALL",ct.ONE="ONE";const Et=r.createCascade(((t,e)=>e?null:i.assign({exclusion:{tests:{},groups:{}},inclusion:{},mode:i.tinyState.createTinyState(exports.Modes.EAGER),testMemoCache:Tt},t)));function ft(t){return Et.useX(t).exclusion}function Nt(){return Et.useX().inclusion}function dt(){return Et.useX().mode()}const Tt=i.cache(10);function Rt(){const t=s.VestRuntime.useAvailableRoot(),n=s.VestRuntime.useEmit(),r=null==t?void 0:t.getOptionalFields();if(i.isEmpty(r))return;const o=new Set;function u(e){o.has(e.fieldName)&&(e.omit(),null==t||t.setOptionalField(e.fieldName,(t=>Object.assign(Object.assign({},t),{applied:!0}))))}ot.walkTests((e=>{e.isPending()||(i.hasOwnProperty(o,e.fieldName)?u(e):function(e){const n=null==t?void 0:t.getOptionalField(e.fieldName);if(i.isNullish(n))return;!0===i.optionalFunctionValue(n.rule)&&o.add(e.fieldName);u(e)}(e))})),n(e.DONE_TEST_OMISSION_PASS)}function St(){const t=s.VestRuntime.useBus();return n(e.TEST_COMPLETED,(n=>{n.isCanceled()||(!function(t){const[e]=f();t&&!ot.hasRemainingTests(t)&&i.isArray(e[t])&&i.callEach(e[t])}(n.fieldName),ot.hasRemainingTests()||t.emit(e.ALL_RUNNING_TESTS_FINISHED))})),n(e.TEST_RUN_STARTED,(()=>{})),n(e.DONE_TEST_OMISSION_PASS,(()=>{})),n(e.ALL_RUNNING_TESTS_FINISHED,(()=>{ot.someTests((t=>t.isAsyncTest()))&&Rt(),function(){const[t]=E();i.callEach(t)}()})),n(e.RESET_FIELD,(t=>{ot.resetField(t)})),n(e.SUITE_RUN_STARTED,(()=>{d()})),n(e.SUITE_CALLBACK_RUN_FINISHED,(()=>{Rt()})),n(e.REMOVE_FIELD,(t=>{ot.removeTestByFieldName(t)})),n(e.RESET_SUITE,(()=>{d(),s.VestRuntime.reset()})),t;function n(e,n){t.on(e,((...t)=>{l().suiteResultCache.invalidate([N()]),n(...t)}))}}function pt(t){const e=Nt(),n=ft();return i.invariant(i.isStringValue(t)),e[t]=i.defaultTo(n.tests[t],!0),{when:function(e){const n=Nt(),s=ft();n[t]=()=>i.hasOwnProperty(s.tests,t)?i.defaultTo(s.tests[t],!0):i.isStringValue(e)?Boolean(s.tests[e]):i.optionalFunctionValue(e,i.optionalFunctionValue(j))}}}function It(t){if(et(t),t.isUntested())return function(t){const e=s.VestRuntime.useBus(),n=function(t){return Et.run({currentTest:t},(()=>t.run()))}(t);try{i.isPromise(n)?(t.asyncTest=n,function(t){const{asyncTest:e,message:n}=t;if(!i.isPromise(e))return;t.setPending();const r=s.VestRuntime.useBus(),o=s.VestRuntime.persist((()=>{mt(r,t)})),u=s.VestRuntime.persist((e=>{t.isCanceled()||(t.message=i.isStringValue(e)?e:n,t.fail(),o())}));e.then(o,u)}(t)):mt(e,t)}catch(e){throw new Error(i.text(p.UNEXPECTED_TEST_REGISTRATION_ERROR,{testObject:JSON.stringify(t),error:e}))}}(t);t.isNonActionable()||i.deferThrow(i.text(p.UNEXPECTED_TEST_REGISTRATION_ERROR,{testObject:JSON.stringify(t)}))}function mt(t,n){n.pass(),t.emit(e.TEST_COMPLETED,n)}function _t(t,...n){const[r,o,u]=i.isFunction(n[1])?n:[void 0,...n];!function(t,e){const n="test";i.invariant(i.isStringValue(t),i.text(p.INVALID_PARAM_PASSED_TO_FUNCTION,{fn_name:n,param:"fieldName",expected:"string"})),i.invariant(i.isFunction(e),i.text(p.INVALID_PARAM_PASSED_TO_FUNCTION,{fn_name:n,param:"callback",expected:"function"}))}(t,o);const a={fieldName:t,groupName:Et.useX().groupName,key:u,message:r,testFn:o};return s.VestRuntime.useEmit()(e.TEST_RUN_STARTED),rt.create(It,a)}const gt=i.assign(_t,{memo:function(t){return function(e,...n){const[r,o,u]=n.reverse();return function(t,e){const n=Et.useX().testMemoCache,s=n.get(t);if(i.isNull(s))return n(t,e);const[,r]=s;if(r.isCanceled())return n.invalidate(t),n(t,e);return rt.setNode(r),r}([N(),e,s.VestRuntime.useCurrentCursor()].concat(r),(function(){return t(e,u,o)}))}}(_t)});function ht(){return{group:Ct,include:pt,omitWhen:$,only:H,optional:o,skip:z,skipWhen:X,test:gt}}function Ot(){return Object.freeze(i.assign({done:s.VestRuntime.persist(At)},j()))}function At(...t){const[e,n]=t.reverse(),s=Ot();if(function(t,e,n){var s;return!!(!i.isFunction(t)||e&&i.numberEquals(null===(s=n.tests[e])||void 0===s?void 0:s.testCount,0))}(e,n,s))return s;const r=()=>e(j());return ot.hasRemainingTests(n)?(function(t,e){const[,n]=f(),[,s]=E();e?n((n=>i.assign(n,{[e]:(n[e]||[]).concat(t)}))):s((e=>e.concat(t)))}(r,n),s):(r(),s)}function vt(...t){const[n,r]=t.reverse();!function(t){i.invariant(i.isFunction(t),p.SUITE_MUST_BE_INITIALIZED_WITH_FUNCTION)}(n);const o=function({suiteName:t}={}){const e={doneCallbacks:i.tinyState.createTinyState((()=>[])),fieldCallbacks:i.tinyState.createTinyState((()=>({}))),suiteId:i.seq(),suiteName:t,suiteResultCache:c};return s.VestRuntime.createRef(e)}({suiteName:r});function u(...t){return Et.run({},(()=>(s.VestRuntime.useEmit()(e.SUITE_RUN_STARTED),a.create(function(t,...n){const i=s.VestRuntime.useEmit();return()=>(t(...n),i(e.SUITE_CALLBACK_RUN_FINISHED),Ot())}(n,...t))))).output}return s.VestRuntime.Run(o,(()=>{return St(),i.assign(s.VestRuntime.persist(u),Object.assign(Object.assign({get:s.VestRuntime.persist(j),remove:s.VestRuntime.usePrepareEmitter(e.REMOVE_FIELD),reset:s.VestRuntime.usePrepareEmitter(e.RESET_SUITE),resetField:s.VestRuntime.usePrepareEmitter(e.RESET_FIELD)},(t=s.VestRuntime.persist(j),{getError:(...e)=>t().getError(...e),getErrors:(...e)=>t().getErrors(...e),getErrorsByGroup:(...e)=>t().getErrorsByGroup(...e),getWarning:(...e)=>t().getWarning(...e),getWarnings:(...e)=>t().getWarnings(...e),getWarningsByGroup:(...e)=>t().getWarningsByGroup(...e),hasErrors:(...e)=>t().hasErrors(...e),hasErrorsByGroup:(...e)=>t().hasErrorsByGroup(...e),hasWarnings:(...e)=>t().hasWarnings(...e),hasWarningsByGroup:(...e)=>t().hasWarningsByGroup(...e),isValid:(...e)=>t().isValid(...e),isValidByGroup:(...e)=>t().isValidByGroup(...e)})),ht()));var t}))}class Dt extends s.Isolate{constructor(){super(...arguments),this.allowReorder=!0}}function Ct(t,e){return s.Isolate.create((()=>{Et.run({groupName:t},e)}))}const Pt=p.WARN_MUST_BE_CALLED_FROM_TEST;Object.defineProperty(exports,"enforce",{enumerable:!0,get:function(){return n.enforce}}),exports.create=vt,exports.each=function(t,e){i.invariant(i.isFunction(e),p.EACH_CALLBACK_MUST_BE_A_FUNCTION),Dt.create((()=>{t.forEach(((t,n)=>{e(t,n)}))}))},exports.group=Ct,exports.include=pt,exports.mode=function(t){const[,e]=dt();e(t)},exports.omitWhen=$,exports.only=H,exports.optional=o,exports.skip=z,exports.skipWhen=X,exports.staticSuite=function(t){return i.assign(((...e)=>vt(t)(...e)),Object.assign({},ht()))},exports.suiteSelectors=b,exports.test=gt,exports.warn=function(){const t=(e=p.HOOK_CALLED_OUTSIDE,Et.useX(e).currentTest);var e;i.invariant(t,Pt),t.warn()};
|
|
@@ -7,15 +7,14 @@ var ErrorStrings;
|
|
|
7
7
|
ErrorStrings["EXPECTED_VEST_TEST"] = "Expected value to be an instance of IsolateTest";
|
|
8
8
|
ErrorStrings["FIELD_NAME_REQUIRED"] = "Field name must be passed";
|
|
9
9
|
ErrorStrings["SUITE_MUST_BE_INITIALIZED_WITH_FUNCTION"] = "Suite must be initialized with a function";
|
|
10
|
-
ErrorStrings["NO_ACTIVE_ISOLATE"] = "Not within an active isolate";
|
|
11
10
|
ErrorStrings["PROMISIFY_REQUIRE_FUNCTION"] = "Vest.Promisify must be called with a function";
|
|
12
11
|
ErrorStrings["PARSER_EXPECT_RESULT_OBJECT"] = "Vest parser: expected argument at position 0 to be Vest's result object.";
|
|
13
12
|
ErrorStrings["WARN_MUST_BE_CALLED_FROM_TEST"] = "Warn must be called from within the body of a test function";
|
|
14
13
|
ErrorStrings["EACH_CALLBACK_MUST_BE_A_FUNCTION"] = "Each must be called with a function";
|
|
15
14
|
ErrorStrings["INVALID_PARAM_PASSED_TO_FUNCTION"] = "Incompatible params passed to {fn_name} function. \"{param}\" must be of type {expected}";
|
|
16
|
-
ErrorStrings["ENCOUNTERED_THE_SAME_KEY_TWICE"] = "Encountered the same test key \"{key}\" twice. This may lead to tests overriding each other's results, or to tests being unexpectedly omitted.";
|
|
17
15
|
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
16
|
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}.";
|
|
17
|
+
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
18
|
})(ErrorStrings || (ErrorStrings = {}));
|
|
20
19
|
|
|
21
20
|
// eslint-disable-next-line @typescript-eslint/ban-ts-comment
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{invariant as e,hasOwnProperty as t,isNullish as n,isPositive as s,isFunction as
|
|
1
|
+
import{invariant as e,hasOwnProperty as t,isNullish as n,isPositive as s,isFunction as r}from"vest-utils";import{suiteSelectors as o}from"vest";var i;function a(a,u={}){const E=function(r){e(r&&t(r,"valid"),i.PARSER_EXPECT_RESULT_OBJECT);const a=o(r),u={},E={invalid:a.hasErrors,tested:function(e){return n(e)?s(r.testCount):t(u,e)?u[e]:(c(e),E.tested(e))},untested:function(e){return!(s(r.testCount)&&E.tested(e))},valid:a.isValid,warning:a.hasWarnings};return E;function c(e){u[e]=t(r.tests,e)&&s(r.tests[e].testCount)}}(a);return function(e){const t=[];for(const n in u){const s=n;r(E[s])&&E[s](e)&&t.push(u[s])}return t.join(" ")}}!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}."}(i||(i={}));export{a as default};
|
|
@@ -7,15 +7,14 @@ var ErrorStrings;
|
|
|
7
7
|
ErrorStrings["EXPECTED_VEST_TEST"] = "Expected value to be an instance of IsolateTest";
|
|
8
8
|
ErrorStrings["FIELD_NAME_REQUIRED"] = "Field name must be passed";
|
|
9
9
|
ErrorStrings["SUITE_MUST_BE_INITIALIZED_WITH_FUNCTION"] = "Suite must be initialized with a function";
|
|
10
|
-
ErrorStrings["NO_ACTIVE_ISOLATE"] = "Not within an active isolate";
|
|
11
10
|
ErrorStrings["PROMISIFY_REQUIRE_FUNCTION"] = "Vest.Promisify must be called with a function";
|
|
12
11
|
ErrorStrings["PARSER_EXPECT_RESULT_OBJECT"] = "Vest parser: expected argument at position 0 to be Vest's result object.";
|
|
13
12
|
ErrorStrings["WARN_MUST_BE_CALLED_FROM_TEST"] = "Warn must be called from within the body of a test function";
|
|
14
13
|
ErrorStrings["EACH_CALLBACK_MUST_BE_A_FUNCTION"] = "Each must be called with a function";
|
|
15
14
|
ErrorStrings["INVALID_PARAM_PASSED_TO_FUNCTION"] = "Incompatible params passed to {fn_name} function. \"{param}\" must be of type {expected}";
|
|
16
|
-
ErrorStrings["ENCOUNTERED_THE_SAME_KEY_TWICE"] = "Encountered the same test key \"{key}\" twice. This may lead to tests overriding each other's results, or to tests being unexpectedly omitted.";
|
|
17
15
|
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
16
|
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}.";
|
|
17
|
+
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
18
|
})(ErrorStrings || (ErrorStrings = {}));
|
|
20
19
|
|
|
21
20
|
// eslint-disable-next-line @typescript-eslint/ban-ts-comment
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{suiteSelectors as e}from"vest";import{invariant as t,hasOwnProperty as s,isNullish as n,isPositive as
|
|
1
|
+
import{suiteSelectors as e}from"vest";import{invariant as t,hasOwnProperty as s,isNullish as n,isPositive as r}from"vest-utils";var i;function o(o){t(o&&s(o,"valid"),i.PARSER_EXPECT_RESULT_OBJECT);const a=e(o),E={},u={invalid:a.hasErrors,tested:function(e){if(n(e))return r(o.testCount);if(s(E,e))return E[e];return _(e),u.tested(e)},untested:function(e){return!(r(o.testCount)&&u.tested(e))},valid:a.isValid,warning:a.hasWarnings};return u;function _(e){E[e]=s(o.tests,e)&&r(o.tests[e].testCount)}}!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}."}(i||(i={}));export{o as parse};
|
|
@@ -6,15 +6,14 @@ var ErrorStrings;
|
|
|
6
6
|
ErrorStrings["EXPECTED_VEST_TEST"] = "Expected value to be an instance of IsolateTest";
|
|
7
7
|
ErrorStrings["FIELD_NAME_REQUIRED"] = "Field name must be passed";
|
|
8
8
|
ErrorStrings["SUITE_MUST_BE_INITIALIZED_WITH_FUNCTION"] = "Suite must be initialized with a function";
|
|
9
|
-
ErrorStrings["NO_ACTIVE_ISOLATE"] = "Not within an active isolate";
|
|
10
9
|
ErrorStrings["PROMISIFY_REQUIRE_FUNCTION"] = "Vest.Promisify must be called with a function";
|
|
11
10
|
ErrorStrings["PARSER_EXPECT_RESULT_OBJECT"] = "Vest parser: expected argument at position 0 to be Vest's result object.";
|
|
12
11
|
ErrorStrings["WARN_MUST_BE_CALLED_FROM_TEST"] = "Warn must be called from within the body of a test function";
|
|
13
12
|
ErrorStrings["EACH_CALLBACK_MUST_BE_A_FUNCTION"] = "Each must be called with a function";
|
|
14
13
|
ErrorStrings["INVALID_PARAM_PASSED_TO_FUNCTION"] = "Incompatible params passed to {fn_name} function. \"{param}\" must be of type {expected}";
|
|
15
|
-
ErrorStrings["ENCOUNTERED_THE_SAME_KEY_TWICE"] = "Encountered the same test key \"{key}\" twice. This may lead to tests overriding each other's results, or to tests being unexpectedly omitted.";
|
|
16
14
|
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
15
|
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}.";
|
|
16
|
+
ErrorStrings["UNEXPECTED_TEST_RUN_ERROR"] = "Unexpected error encountered during test run. Please report this issue to Vest's Github repository.\n Test Object: {testObject}.";
|
|
18
17
|
})(ErrorStrings || (ErrorStrings = {}));
|
|
19
18
|
|
|
20
19
|
function promisify(validatorFn) {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{invariant as e,isFunction as t}from"vest-utils";var s;function n(n){return(...
|
|
1
|
+
import{invariant as e,isFunction as t}from"vest-utils";var s;function n(n){return(...r)=>(e(t(n),s.PROMISIFY_REQUIRE_FUNCTION),new Promise((e=>n(...r).done(e))))}!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}."}(s||(s={}));export{n as default};
|