@jivanf/vest
Version:
Declarative Form Validations Framework
3 lines (2 loc) • 2.66 kB
JavaScript
!function(e,t){"object"==typeof exports&&"undefined"!=typeof module?module.exports=t(require("vest-utils"),require("vest")):"function"==typeof define&&define.amd?define(["vest-utils","vest"],t):(e="undefined"!=typeof globalThis?globalThis:e||self).classnames=t(e["vest-utils"],e.vest)}(this,(function(e,t){"use strict";var s;return 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."}(s||(s={})),function(n,i={}){const o=function(n){e.invariant(n&&e.hasOwnProperty(n,"valid"),s.PARSER_EXPECT_RESULT_OBJECT);const i=t.suiteSelectors(n),o={},r={invalid:i.hasErrors,pending:i.isPending,tested:function(t){return e.isNullish(t)?e.isPositive(n.testCount):e.hasOwnProperty(o,t)?o[t]:(a(t),r.tested(t))},untested:function(t){return!(e.isPositive(n.testCount)&&r.tested(t))},valid:i.isValid,warning:i.hasWarnings};return r;function a(t){o[t]=e.hasOwnProperty(n.tests,t)&&e.isPositive(n.tests[t].testCount)}}(n);return function(t){const s=[];for(const n in i){const r=n;e.isFunction(o[r])&&o[r](t)&&s.push(i[r])}return s.join(" ")}}}));
//# sourceMappingURL=classnames.production.js.map