diff --git a/packages/context/src/__tests__/__snapshots__/cascade.test.ts.snap b/packages/context/src/__tests__/__snapshots__/cascade.test.ts.snap index 61ba7841b..2116e67f9 100644 --- a/packages/context/src/__tests__/__snapshots__/cascade.test.ts.snap +++ b/packages/context/src/__tests__/__snapshots__/cascade.test.ts.snap @@ -21,25 +21,3 @@ exports[`Cascading Context > createCascade > Should return all methods 1`] = ` "useX": [Function], } `; - -exports[`Cascading Context context.run Should clear context after callback run 1`] = ` -{ - "a": 1, -} -`; - -exports[`Cascading Context context.run Should clear context after callback run 2`] = ` -{ - "a": 1, - "b": 2, -} -`; - -exports[`Cascading Context createCascade Should return all methods 1`] = ` -{ - "bind": [Function], - "run": [Function], - "use": [Function], - "useX": [Function], -} -`; diff --git a/packages/vest/src/__tests__/__snapshots__/integration.async-tests.test.ts.snap b/packages/vest/src/__tests__/__snapshots__/integration.async-tests.test.ts.snap index c19491937..6075e869a 100644 --- a/packages/vest/src/__tests__/__snapshots__/integration.async-tests.test.ts.snap +++ b/packages/vest/src/__tests__/__snapshots__/integration.async-tests.test.ts.snap @@ -76,80 +76,3 @@ exports[`Stateful behavior > Should have all fields 1`] = ` }, } `; - -exports[`Stateful behavior Should have all fields 1`] = ` -{ - "field_1": SummaryBase { - "errorCount": 1, - "errors": [ - "field_statement_1", - ], - "pendingCount": 0, - "testCount": 1, - "valid": false, - "warnCount": 0, - "warnings": [], - }, - "field_2": SummaryBase { - "errorCount": 1, - "errors": [ - "field_statement_2", - ], - "pendingCount": 0, - "testCount": 1, - "valid": false, - "warnCount": 0, - "warnings": [], - }, - "field_3": SummaryBase { - "errorCount": 0, - "errors": [], - "pendingCount": 0, - "testCount": 1, - "valid": true, - "warnCount": 0, - "warnings": [], - }, - "field_4": { - "errorCount": 0, - "errors": [], - "pendingCount": 0, - "testCount": 2, - "valid": true, - "warnCount": 1, - "warnings": [ - "field_statement_4", - ], - }, - "field_5": { - "errorCount": 2, - "errors": [ - "field_statement_5", - "field_statement_6", - ], - "pendingCount": 0, - "testCount": 2, - "valid": false, - "warnCount": 0, - "warnings": [], - }, - "field_6": SummaryBase { - "errorCount": 0, - "errors": [], - "pendingCount": 1, - "testCount": 1, - "valid": false, - "warnCount": 0, - "warnings": [], - }, - "field_7": SummaryBase { - "errorCount": 0, - "errors": [], - "pendingCount": 1, - "testCount": 1, - "valid": false, - "warnCount": 0, - "warnings": [], - }, -} -`; diff --git a/packages/vest/src/__tests__/__snapshots__/integration.base.test.ts.snap b/packages/vest/src/__tests__/__snapshots__/integration.base.test.ts.snap index d6390bded..97d0c36ac 100644 --- a/packages/vest/src/__tests__/__snapshots__/integration.base.test.ts.snap +++ b/packages/vest/src/__tests__/__snapshots__/integration.base.test.ts.snap @@ -99,103 +99,3 @@ exports[`Base behavior > Should produce correct validation result 1`] = ` ], } `; - -exports[`Base behavior Should produce correct validation result 1`] = ` -{ - "done": [Function], - "errorCount": 2, - "errors": [ - SummaryFailure { - "fieldName": "field_1", - "groupName": undefined, - "message": "field_statement_1", - }, - SummaryFailure { - "fieldName": "field_2", - "groupName": undefined, - "message": "field_statement_2", - }, - ], - "getError": [Function], - "getErrors": [Function], - "getErrorsByGroup": [Function], - "getMessage": [Function], - "getWarning": [Function], - "getWarnings": [Function], - "getWarningsByGroup": [Function], - "groups": {}, - "hasErrors": [Function], - "hasErrorsByGroup": [Function], - "hasWarnings": [Function], - "hasWarningsByGroup": [Function], - "isPending": [Function], - "isTested": [Function], - "isValid": [Function], - "isValidByGroup": [Function], - "pendingCount": 0, - "suiteName": undefined, - "testCount": 5, - "tests": { - "field_1": SummaryBase { - "errorCount": 1, - "errors": [ - "field_statement_1", - ], - "pendingCount": 0, - "testCount": 1, - "valid": false, - "warnCount": 0, - "warnings": [], - }, - "field_2": SummaryBase { - "errorCount": 1, - "errors": [ - "field_statement_2", - ], - "pendingCount": 0, - "testCount": 1, - "valid": false, - "warnCount": 0, - "warnings": [], - }, - "field_3": SummaryBase { - "errorCount": 0, - "errors": [], - "pendingCount": 0, - "testCount": 1, - "valid": true, - "warnCount": 0, - "warnings": [], - }, - "field_4": { - "errorCount": 0, - "errors": [], - "pendingCount": 0, - "testCount": 2, - "valid": true, - "warnCount": 1, - "warnings": [ - "field_statement_4", - ], - }, - "field_5": { - "errorCount": 0, - "errors": [], - "pendingCount": 0, - "testCount": 0, - "valid": false, - "warnCount": 0, - "warnings": [], - }, - }, - "valid": false, - "warnCount": 1, - "warnings": [ - SummaryFailure { - "fieldName": "field_4", - "groupName": undefined, - "message": "field_statement_4", - }, - ], -} -`; diff --git a/packages/vest/src/__tests__/__snapshots__/integration.stateful-async.test.ts.snap b/packages/vest/src/__tests__/__snapshots__/integration.stateful-async.test.ts.snap index 71c401e04..038af42aa 100644 --- a/packages/vest/src/__tests__/__snapshots__/integration.stateful-async.test.ts.snap +++ b/packages/vest/src/__tests__/__snapshots__/integration.stateful-async.test.ts.snap @@ -326,330 +326,3 @@ SuiteSummary { "warnings": [], } `; - -exports[`Stateful async tests Merges skipped validations from previous suite 1`] = ` -{ - "done": [Function], - "errorCount": 1, - "errors": [ - SummaryFailure { - "fieldName": "field_1", - "groupName": undefined, - "message": "field_message_1", - }, - ], - "getError": [Function], - "getErrors": [Function], - "getErrorsByGroup": [Function], - "getMessage": [Function], - "getWarning": [Function], - "getWarnings": [Function], - "getWarningsByGroup": [Function], - "groups": { - "group": { - "field_1": SummaryBase { - "errorCount": 0, - "errors": [], - "pendingCount": 0, - "testCount": 0, - "valid": false, - "warnCount": 0, - "warnings": [], - }, - "field_4": SummaryBase { - "errorCount": 0, - "errors": [], - "pendingCount": 0, - "testCount": 0, - "valid": false, - "warnCount": 0, - "warnings": [], - }, - }, - }, - "hasErrors": [Function], - "hasErrorsByGroup": [Function], - "hasWarnings": [Function], - "hasWarningsByGroup": [Function], - "isPending": [Function], - "isTested": [Function], - "isValid": [Function], - "isValidByGroup": [Function], - "pendingCount": 1, - "suiteName": undefined, - "testCount": 3, - "tests": { - "field_1": { - "errorCount": 1, - "errors": [ - "field_message_1", - ], - "pendingCount": 0, - "testCount": 1, - "valid": false, - "warnCount": 0, - "warnings": [], - }, - "field_2": { - "errorCount": 0, - "errors": [], - "pendingCount": 1, - "testCount": 2, - "valid": false, - "warnCount": 0, - "warnings": [], - }, - "field_3": { - "errorCount": 0, - "errors": [], - "pendingCount": 0, - "testCount": 0, - "valid": false, - "warnCount": 0, - "warnings": [], - }, - "field_4": SummaryBase { - "errorCount": 0, - "errors": [], - "pendingCount": 0, - "testCount": 0, - "valid": false, - "warnCount": 0, - "warnings": [], - }, - }, - "valid": false, - "warnCount": 0, - "warnings": [], -} -`; - -exports[`Stateful async tests Merges skipped validations from previous suite 2`] = ` -SuiteSummary { - "errorCount": 2, - "errors": [ - SummaryFailure { - "fieldName": "field_1", - "groupName": undefined, - "message": "field_message_1", - }, - SummaryFailure { - "fieldName": "field_2", - "groupName": undefined, - "message": "rejection_message_1", - }, - ], - "getError": [Function], - "getErrors": [Function], - "getErrorsByGroup": [Function], - "getMessage": [Function], - "getWarning": [Function], - "getWarnings": [Function], - "getWarningsByGroup": [Function], - "groups": { - "group": { - "field_1": SummaryBase { - "errorCount": 0, - "errors": [], - "pendingCount": 0, - "testCount": 0, - "valid": false, - "warnCount": 0, - "warnings": [], - }, - "field_4": SummaryBase { - "errorCount": 0, - "errors": [], - "pendingCount": 0, - "testCount": 0, - "valid": false, - "warnCount": 0, - "warnings": [], - }, - }, - }, - "hasErrors": [Function], - "hasErrorsByGroup": [Function], - "hasWarnings": [Function], - "hasWarningsByGroup": [Function], - "isPending": [Function], - "isTested": [Function], - "isValid": [Function], - "isValidByGroup": [Function], - "pendingCount": 0, - "suiteName": undefined, - "testCount": 3, - "tests": { - "field_1": { - "errorCount": 1, - "errors": [ - "field_message_1", - ], - "pendingCount": 0, - "testCount": 1, - "valid": false, - "warnCount": 0, - "warnings": [], - }, - "field_2": { - "errorCount": 1, - "errors": [ - "rejection_message_1", - ], - "pendingCount": 0, - "testCount": 2, - "valid": false, - "warnCount": 0, - "warnings": [], - }, - "field_3": { - "errorCount": 0, - "errors": [], - "pendingCount": 0, - "testCount": 0, - "valid": false, - "warnCount": 0, - "warnings": [], - }, - "field_4": SummaryBase { - "errorCount": 0, - "errors": [], - "pendingCount": 0, - "testCount": 0, - "valid": false, - "warnCount": 0, - "warnings": [], - }, - }, - "valid": false, - "warnCount": 0, - "warnings": [], -} -`; - -exports[`Stateful async tests Merges skipped validations from previous suite 3`] = ` -SuiteSummary { - "errorCount": 5, - "errors": [ - SummaryFailure { - "fieldName": "field_1", - "groupName": "group", - "message": "field_1_group_message", - }, - SummaryFailure { - "fieldName": "field_4", - "groupName": "group", - "message": "field_4_group_message", - }, - SummaryFailure { - "fieldName": "field_1", - "groupName": undefined, - "message": "field_message_1", - }, - SummaryFailure { - "fieldName": "field_2", - "groupName": undefined, - "message": "rejection_message_1", - }, - SummaryFailure { - "fieldName": "field_3", - "groupName": undefined, - "message": "field_message_3", - }, - ], - "getError": [Function], - "getErrors": [Function], - "getErrorsByGroup": [Function], - "getMessage": [Function], - "getWarning": [Function], - "getWarnings": [Function], - "getWarningsByGroup": [Function], - "groups": { - "group": { - "field_1": SummaryBase { - "errorCount": 1, - "errors": [ - "field_1_group_message", - ], - "pendingCount": 0, - "testCount": 1, - "valid": false, - "warnCount": 0, - "warnings": [], - }, - "field_4": SummaryBase { - "errorCount": 1, - "errors": [ - "field_4_group_message", - ], - "pendingCount": 0, - "testCount": 1, - "valid": false, - "warnCount": 0, - "warnings": [], - }, - }, - }, - "hasErrors": [Function], - "hasErrorsByGroup": [Function], - "hasWarnings": [Function], - "hasWarningsByGroup": [Function], - "isPending": [Function], - "isTested": [Function], - "isValid": [Function], - "isValidByGroup": [Function], - "pendingCount": 0, - "suiteName": undefined, - "testCount": 7, - "tests": { - "field_1": { - "errorCount": 2, - "errors": [ - "field_1_group_message", - "field_message_1", - ], - "pendingCount": 0, - "testCount": 2, - "valid": false, - "warnCount": 0, - "warnings": [], - }, - "field_2": { - "errorCount": 1, - "errors": [ - "rejection_message_1", - ], - "pendingCount": 0, - "testCount": 2, - "valid": false, - "warnCount": 0, - "warnings": [], - }, - "field_3": { - "errorCount": 1, - "errors": [ - "field_message_3", - ], - "pendingCount": 0, - "testCount": 2, - "valid": false, - "warnCount": 0, - "warnings": [], - }, - "field_4": SummaryBase { - "errorCount": 1, - "errors": [ - "field_4_group_message", - ], - "pendingCount": 0, - "testCount": 1, - "valid": false, - "warnCount": 0, - "warnings": [], - }, - }, - "valid": false, - "warnCount": 0, - "warnings": [], -} -`; diff --git a/packages/vest/src/__tests__/__snapshots__/integration.stateful-tests.test.ts.snap b/packages/vest/src/__tests__/__snapshots__/integration.stateful-tests.test.ts.snap index e2632f50d..75fa4d93a 100644 --- a/packages/vest/src/__tests__/__snapshots__/integration.stateful-tests.test.ts.snap +++ b/packages/vest/src/__tests__/__snapshots__/integration.stateful-tests.test.ts.snap @@ -296,302 +296,6 @@ exports[`Stateful behavior > Should merge skipped fields with previous values 3` } `; -exports[`Stateful behavior Should merge skipped fields with previous values 1`] = ` -{ - "done": [Function], - "errorCount": 1, - "errors": [ - SummaryFailure { - "fieldName": "field_1", - "groupName": undefined, - "message": "field_statement_1", - }, - ], - "getError": [Function], - "getErrors": [Function], - "getErrorsByGroup": [Function], - "getMessage": [Function], - "getWarning": [Function], - "getWarnings": [Function], - "getWarningsByGroup": [Function], - "groups": {}, - "hasErrors": [Function], - "hasErrorsByGroup": [Function], - "hasWarnings": [Function], - "hasWarningsByGroup": [Function], - "isPending": [Function], - "isTested": [Function], - "isValid": [Function], - "isValidByGroup": [Function], - "pendingCount": 0, - "suiteName": undefined, - "testCount": 1, - "tests": { - "field_1": SummaryBase { - "errorCount": 1, - "errors": [ - "field_statement_1", - ], - "pendingCount": 0, - "testCount": 1, - "valid": false, - "warnCount": 0, - "warnings": [], - }, - "field_2": SummaryBase { - "errorCount": 0, - "errors": [], - "pendingCount": 0, - "testCount": 0, - "valid": false, - "warnCount": 0, - "warnings": [], - }, - "field_3": SummaryBase { - "errorCount": 0, - "errors": [], - "pendingCount": 0, - "testCount": 0, - "valid": false, - "warnCount": 0, - "warnings": [], - }, - "field_4": { - "errorCount": 0, - "errors": [], - "pendingCount": 0, - "testCount": 0, - "valid": false, - "warnCount": 0, - "warnings": [], - }, - "field_5": { - "errorCount": 0, - "errors": [], - "pendingCount": 0, - "testCount": 0, - "valid": false, - "warnCount": 0, - "warnings": [], - }, - }, - "valid": false, - "warnCount": 0, - "warnings": [], -} -`; - -exports[`Stateful behavior Should merge skipped fields with previous values 2`] = ` -{ - "done": [Function], - "errorCount": 3, - "errors": [ - SummaryFailure { - "fieldName": "field_1", - "groupName": undefined, - "message": "field_statement_1", - }, - SummaryFailure { - "fieldName": "field_5", - "groupName": undefined, - "message": "field_statement_5", - }, - SummaryFailure { - "fieldName": "field_5", - "groupName": undefined, - "message": "field_statement_6", - }, - ], - "getError": [Function], - "getErrors": [Function], - "getErrorsByGroup": [Function], - "getMessage": [Function], - "getWarning": [Function], - "getWarnings": [Function], - "getWarningsByGroup": [Function], - "groups": {}, - "hasErrors": [Function], - "hasErrorsByGroup": [Function], - "hasWarnings": [Function], - "hasWarningsByGroup": [Function], - "isPending": [Function], - "isTested": [Function], - "isValid": [Function], - "isValidByGroup": [Function], - "pendingCount": 0, - "suiteName": undefined, - "testCount": 3, - "tests": { - "field_1": SummaryBase { - "errorCount": 1, - "errors": [ - "field_statement_1", - ], - "pendingCount": 0, - "testCount": 1, - "valid": false, - "warnCount": 0, - "warnings": [], - }, - "field_2": SummaryBase { - "errorCount": 0, - "errors": [], - "pendingCount": 0, - "testCount": 0, - "valid": false, - "warnCount": 0, - "warnings": [], - }, - "field_3": SummaryBase { - "errorCount": 0, - "errors": [], - "pendingCount": 0, - "testCount": 0, - "valid": false, - "warnCount": 0, - "warnings": [], - }, - "field_4": { - "errorCount": 0, - "errors": [], - "pendingCount": 0, - "testCount": 0, - "valid": false, - "warnCount": 0, - "warnings": [], - }, - "field_5": { - "errorCount": 2, - "errors": [ - "field_statement_5", - "field_statement_6", - ], - "pendingCount": 0, - "testCount": 2, - "valid": false, - "warnCount": 0, - "warnings": [], - }, - }, - "valid": false, - "warnCount": 0, - "warnings": [], -} -`; - -exports[`Stateful behavior Should merge skipped fields with previous values 3`] = ` -{ - "done": [Function], - "errorCount": 4, - "errors": [ - SummaryFailure { - "fieldName": "field_1", - "groupName": undefined, - "message": "field_statement_1", - }, - SummaryFailure { - "fieldName": "field_2", - "groupName": undefined, - "message": "field_statement_2", - }, - SummaryFailure { - "fieldName": "field_5", - "groupName": undefined, - "message": "field_statement_5", - }, - SummaryFailure { - "fieldName": "field_5", - "groupName": undefined, - "message": "field_statement_6", - }, - ], - "getError": [Function], - "getErrors": [Function], - "getErrorsByGroup": [Function], - "getMessage": [Function], - "getWarning": [Function], - "getWarnings": [Function], - "getWarningsByGroup": [Function], - "groups": {}, - "hasErrors": [Function], - "hasErrorsByGroup": [Function], - "hasWarnings": [Function], - "hasWarningsByGroup": [Function], - "isPending": [Function], - "isTested": [Function], - "isValid": [Function], - "isValidByGroup": [Function], - "pendingCount": 0, - "suiteName": undefined, - "testCount": 7, - "tests": { - "field_1": SummaryBase { - "errorCount": 1, - "errors": [ - "field_statement_1", - ], - "pendingCount": 0, - "testCount": 1, - "valid": false, - "warnCount": 0, - "warnings": [], - }, - "field_2": SummaryBase { - "errorCount": 1, - "errors": [ - "field_statement_2", - ], - "pendingCount": 0, - "testCount": 1, - "valid": false, - "warnCount": 0, - "warnings": [], - }, - "field_3": SummaryBase { - "errorCount": 0, - "errors": [], - "pendingCount": 0, - "testCount": 1, - "valid": true, - "warnCount": 0, - "warnings": [], - }, - "field_4": { - "errorCount": 0, - "errors": [], - "pendingCount": 0, - "testCount": 2, - "valid": true, - "warnCount": 1, - "warnings": [ - "field_statement_4", - ], - }, - "field_5": { - "errorCount": 2, - "errors": [ - "field_statement_5", - "field_statement_6", - ], - "pendingCount": 0, - "testCount": 2, - "valid": false, - "warnCount": 0, - "warnings": [], - }, - }, - "valid": false, - "warnCount": 1, - "warnings": [ - SummaryFailure { - "fieldName": "field_4", - "groupName": undefined, - "message": "field_statement_4", - }, - ], -} -`; - exports[`more complex > Should run correctly 1`] = ` SuiteSummary { "errorCount": 0, @@ -811,223 +515,3 @@ SuiteSummary { "warnings": [], } `; - -exports[`more complex Should run correctly 1`] = ` -SuiteSummary { - "errorCount": 0, - "errors": [], - "getError": [Function], - "getErrors": [Function], - "getErrorsByGroup": [Function], - "getMessage": [Function], - "getWarning": [Function], - "getWarnings": [Function], - "getWarningsByGroup": [Function], - "groups": {}, - "hasErrors": [Function], - "hasErrorsByGroup": [Function], - "hasWarnings": [Function], - "hasWarningsByGroup": [Function], - "isPending": [Function], - "isTested": [Function], - "isValid": [Function], - "isValidByGroup": [Function], - "pendingCount": 0, - "suiteName": undefined, - "testCount": 0, - "tests": {}, - "valid": false, - "warnCount": 0, - "warnings": [], -} -`; - -exports[`more complex Should run correctly 2`] = ` -SuiteSummary { - "errorCount": 0, - "errors": [], - "getError": [Function], - "getErrors": [Function], - "getErrorsByGroup": [Function], - "getMessage": [Function], - "getWarning": [Function], - "getWarnings": [Function], - "getWarningsByGroup": [Function], - "groups": {}, - "hasErrors": [Function], - "hasErrorsByGroup": [Function], - "hasWarnings": [Function], - "hasWarningsByGroup": [Function], - "isPending": [Function], - "isTested": [Function], - "isValid": [Function], - "isValidByGroup": [Function], - "pendingCount": 0, - "suiteName": undefined, - "testCount": 2, - "tests": { - "confirm": SummaryBase { - "errorCount": 0, - "errors": [], - "pendingCount": 0, - "testCount": 0, - "valid": false, - "warnCount": 0, - "warnings": [], - }, - "password": SummaryBase { - "errorCount": 0, - "errors": [], - "pendingCount": 0, - "testCount": 0, - "valid": false, - "warnCount": 0, - "warnings": [], - }, - "username": { - "errorCount": 0, - "errors": [], - "pendingCount": 0, - "testCount": 2, - "valid": true, - "warnCount": 0, - "warnings": [], - }, - }, - "valid": false, - "warnCount": 0, - "warnings": [], -} -`; - -exports[`more complex Should run correctly 4`] = ` -SuiteSummary { - "errorCount": 1, - "errors": [ - SummaryFailure { - "fieldName": "password", - "groupName": undefined, - "message": "password is required", - }, - ], - "getError": [Function], - "getErrors": [Function], - "getErrorsByGroup": [Function], - "getMessage": [Function], - "getWarning": [Function], - "getWarnings": [Function], - "getWarningsByGroup": [Function], - "groups": {}, - "hasErrors": [Function], - "hasErrorsByGroup": [Function], - "hasWarnings": [Function], - "hasWarningsByGroup": [Function], - "isPending": [Function], - "isTested": [Function], - "isValid": [Function], - "isValidByGroup": [Function], - "pendingCount": 0, - "suiteName": undefined, - "testCount": 3, - "tests": { - "confirm": SummaryBase { - "errorCount": 0, - "errors": [], - "pendingCount": 0, - "testCount": 0, - "valid": false, - "warnCount": 0, - "warnings": [], - }, - "password": SummaryBase { - "errorCount": 1, - "errors": [ - "password is required", - ], - "pendingCount": 0, - "testCount": 1, - "valid": false, - "warnCount": 0, - "warnings": [], - }, - "username": { - "errorCount": 0, - "errors": [], - "pendingCount": 0, - "testCount": 2, - "valid": true, - "warnCount": 0, - "warnings": [], - }, - }, - "valid": false, - "warnCount": 0, - "warnings": [], -} -`; - -exports[`more complex Should run correctly 6`] = ` -SuiteSummary { - "errorCount": 1, - "errors": [ - SummaryFailure { - "fieldName": "password", - "groupName": undefined, - "message": "password is required", - }, - ], - "getError": [Function], - "getErrors": [Function], - "getErrorsByGroup": [Function], - "getMessage": [Function], - "getWarning": [Function], - "getWarnings": [Function], - "getWarningsByGroup": [Function], - "groups": {}, - "hasErrors": [Function], - "hasErrorsByGroup": [Function], - "hasWarnings": [Function], - "hasWarningsByGroup": [Function], - "isPending": [Function], - "isTested": [Function], - "isValid": [Function], - "isValidByGroup": [Function], - "pendingCount": 0, - "suiteName": undefined, - "testCount": 3, - "tests": { - "confirm": SummaryBase { - "errorCount": 0, - "errors": [], - "pendingCount": 0, - "testCount": 0, - "valid": false, - "warnCount": 0, - "warnings": [], - }, - "password": SummaryBase { - "errorCount": 1, - "errors": [ - "password is required", - ], - "pendingCount": 0, - "testCount": 1, - "valid": false, - "warnCount": 0, - "warnings": [], - }, - "username": { - "errorCount": 0, - "errors": [], - "pendingCount": 0, - "testCount": 2, - "valid": true, - "warnCount": 0, - "warnings": [], - }, - }, - "valid": false, - "warnCount": 0, - "warnings": [], -} -`; diff --git a/packages/vest/src/core/__tests__/__snapshots__/runtime.test.ts.snap b/packages/vest/src/core/__tests__/__snapshots__/runtime.test.ts.snap index 428845f01..07e283703 100644 --- a/packages/vest/src/core/__tests__/__snapshots__/runtime.test.ts.snap +++ b/packages/vest/src/core/__tests__/__snapshots__/runtime.test.ts.snap @@ -499,503 +499,3 @@ SuiteSummary { ], } `; - -exports[`useLoadSuite Calling useLoadSuite should resume from loaded state 1`] = ` -{ - "$type": "Suite", - "abortController": AbortController {}, - "allowReorder": undefined, - "children": [ - { - "$type": "Focused", - "abortController": AbortController {}, - "allowReorder": undefined, - "children": null, - "data": { - "focusMode": 1, - "match": [ - "t5", - ], - "matchAll": false, - }, - "key": null, - "keys": null, - "output": undefined, - "parent": [Circular], - "status": "DONE", - }, - { - "$type": "Test", - "abortController": AbortController {}, - "allowReorder": undefined, - "children": null, - "data": { - "fieldName": "t1", - "severity": "error", - "testFn": [Function], - }, - "key": null, - "keys": null, - "output": undefined, - "parent": [Circular], - "status": "FAILED", - }, - { - "$type": "Group", - "abortController": AbortController {}, - "allowReorder": undefined, - "children": [ - { - "$type": "Test", - "abortController": AbortController {}, - "allowReorder": undefined, - "children": null, - "data": { - "fieldName": "t2", - "groupName": "g1", - "message": "t2 message", - "severity": "error", - "testFn": [Function], - }, - "key": null, - "keys": null, - "output": undefined, - "parent": [Circular], - "status": "FAILED", - }, - { - "$type": "Test", - "abortController": AbortController {}, - "allowReorder": undefined, - "children": null, - "data": { - "fieldName": "t3", - "groupName": "g1", - "severity": "error", - "testFn": [Function], - }, - "key": null, - "keys": null, - "output": undefined, - "parent": [Circular], - "status": "PASSING", - }, - { - "$type": "Test", - "abortController": AbortController {}, - "allowReorder": undefined, - "children": null, - "data": { - "fieldName": "t4", - "groupName": "g1", - "severity": "warning", - "testFn": [Function], - }, - "key": null, - "keys": null, - "output": undefined, - "parent": [Circular], - "status": "WARNING", - }, - ], - "data": {}, - "key": null, - "keys": null, - "output": undefined, - "parent": [Circular], - "status": "DONE", - }, - { - "$type": "Test", - "abortController": AbortController {}, - "allowReorder": undefined, - "children": null, - "data": { - "fieldName": "t5", - "severity": "error", - "testFn": [Function], - }, - "key": null, - "keys": null, - "output": undefined, - "parent": [Circular], - "status": "SKIPPED", - }, - { - "$type": "Each", - "abortController": AbortController {}, - "allowReorder": true, - "children": [ - { - "$type": "Test", - "abortController": AbortController {}, - "allowReorder": undefined, - "children": null, - "data": { - "fieldName": "t6", - "severity": "error", - "testFn": [Function], - }, - "key": "a", - "keys": null, - "output": undefined, - "parent": [Circular], - "status": "FAILED", - }, - { - "$type": "Test", - "abortController": AbortController {}, - "allowReorder": undefined, - "children": null, - "data": { - "fieldName": "t6", - "severity": "error", - "testFn": [Function], - }, - "key": "b", - "keys": null, - "output": undefined, - "parent": [Circular], - "status": "FAILED", - }, - ], - "data": {}, - "key": null, - "keys": { - "a": { - "$type": "Test", - "abortController": AbortController {}, - "allowReorder": undefined, - "children": null, - "data": { - "fieldName": "t6", - "severity": "error", - "testFn": [Function], - }, - "key": "a", - "keys": null, - "output": undefined, - "parent": [Circular], - "status": "FAILED", - }, - "b": { - "$type": "Test", - "abortController": AbortController {}, - "allowReorder": undefined, - "children": null, - "data": { - "fieldName": "t6", - "severity": "error", - "testFn": [Function], - }, - "key": "b", - "keys": null, - "output": undefined, - "parent": [Circular], - "status": "FAILED", - }, - }, - "output": undefined, - "parent": [Circular], - "status": "DONE", - }, - ], - "data": { - "optional": {}, - }, - "key": null, - "keys": null, - "output": { - "done": [Function], - "errorCount": 4, - "errors": [ - SummaryFailure { - "fieldName": "t1", - "groupName": undefined, - "message": undefined, - }, - SummaryFailure { - "fieldName": "t2", - "groupName": "g1", - "message": "t2 message", - }, - SummaryFailure { - "fieldName": "t6", - "groupName": undefined, - "message": undefined, - }, - SummaryFailure { - "fieldName": "t6", - "groupName": undefined, - "message": undefined, - }, - ], - "getError": [Function], - "getErrors": [Function], - "getErrorsByGroup": [Function], - "getMessage": [Function], - "getWarning": [Function], - "getWarnings": [Function], - "getWarningsByGroup": [Function], - "groups": { - "g1": { - "t2": SummaryBase { - "errorCount": 1, - "errors": [ - "t2 message", - ], - "pendingCount": 0, - "testCount": 1, - "valid": false, - "warnCount": 0, - "warnings": [], - }, - "t3": SummaryBase { - "errorCount": 0, - "errors": [], - "pendingCount": 0, - "testCount": 1, - "valid": true, - "warnCount": 0, - "warnings": [], - }, - "t4": SummaryBase { - "errorCount": 0, - "errors": [], - "pendingCount": 0, - "testCount": 1, - "valid": true, - "warnCount": 1, - "warnings": [], - }, - }, - }, - "hasErrors": [Function], - "hasErrorsByGroup": [Function], - "hasWarnings": [Function], - "hasWarningsByGroup": [Function], - "isPending": [Function], - "isTested": [Function], - "isValid": [Function], - "isValidByGroup": [Function], - "pendingCount": 0, - "suiteName": undefined, - "testCount": 6, - "tests": { - "t1": SummaryBase { - "errorCount": 1, - "errors": [], - "pendingCount": 0, - "testCount": 1, - "valid": false, - "warnCount": 0, - "warnings": [], - }, - "t2": SummaryBase { - "errorCount": 1, - "errors": [ - "t2 message", - ], - "pendingCount": 0, - "testCount": 1, - "valid": false, - "warnCount": 0, - "warnings": [], - }, - "t3": SummaryBase { - "errorCount": 0, - "errors": [], - "pendingCount": 0, - "testCount": 1, - "valid": true, - "warnCount": 0, - "warnings": [], - }, - "t4": SummaryBase { - "errorCount": 0, - "errors": [], - "pendingCount": 0, - "testCount": 1, - "valid": true, - "warnCount": 1, - "warnings": [], - }, - "t5": SummaryBase { - "errorCount": 0, - "errors": [], - "pendingCount": 0, - "testCount": 0, - "valid": false, - "warnCount": 0, - "warnings": [], - }, - "t6": { - "errorCount": 2, - "errors": [], - "pendingCount": 0, - "testCount": 2, - "valid": false, - "warnCount": 0, - "warnings": [], - }, - }, - "valid": false, - "warnCount": 1, - "warnings": [ - SummaryFailure { - "fieldName": "t4", - "groupName": "g1", - "message": undefined, - }, - ], - }, - "parent": null, - "status": "DONE", -} -`; - -exports[`useLoadSuite Calling useLoadSuite should resume from loaded state 2`] = ` -SuiteSummary { - "errorCount": 4, - "errors": [ - SummaryFailure { - "fieldName": "t1", - "groupName": undefined, - "message": undefined, - }, - SummaryFailure { - "fieldName": "t2", - "groupName": "g1", - "message": "t2 message", - }, - SummaryFailure { - "fieldName": "t6", - "groupName": undefined, - "message": undefined, - }, - SummaryFailure { - "fieldName": "t6", - "groupName": undefined, - "message": undefined, - }, - ], - "getError": [Function], - "getErrors": [Function], - "getErrorsByGroup": [Function], - "getMessage": [Function], - "getWarning": [Function], - "getWarnings": [Function], - "getWarningsByGroup": [Function], - "groups": { - "g1": { - "t2": SummaryBase { - "errorCount": 1, - "errors": [ - "t2 message", - ], - "pendingCount": 0, - "testCount": 1, - "valid": false, - "warnCount": 0, - "warnings": [], - }, - "t3": SummaryBase { - "errorCount": 0, - "errors": [], - "pendingCount": 0, - "testCount": 1, - "valid": true, - "warnCount": 0, - "warnings": [], - }, - "t4": SummaryBase { - "errorCount": 0, - "errors": [], - "pendingCount": 0, - "testCount": 1, - "valid": true, - "warnCount": 1, - "warnings": [], - }, - }, - }, - "hasErrors": [Function], - "hasErrorsByGroup": [Function], - "hasWarnings": [Function], - "hasWarningsByGroup": [Function], - "isPending": [Function], - "isTested": [Function], - "isValid": [Function], - "isValidByGroup": [Function], - "pendingCount": 0, - "suiteName": undefined, - "testCount": 6, - "tests": { - "t1": SummaryBase { - "errorCount": 1, - "errors": [], - "pendingCount": 0, - "testCount": 1, - "valid": false, - "warnCount": 0, - "warnings": [], - }, - "t2": SummaryBase { - "errorCount": 1, - "errors": [ - "t2 message", - ], - "pendingCount": 0, - "testCount": 1, - "valid": false, - "warnCount": 0, - "warnings": [], - }, - "t3": SummaryBase { - "errorCount": 0, - "errors": [], - "pendingCount": 0, - "testCount": 1, - "valid": true, - "warnCount": 0, - "warnings": [], - }, - "t4": SummaryBase { - "errorCount": 0, - "errors": [], - "pendingCount": 0, - "testCount": 1, - "valid": true, - "warnCount": 1, - "warnings": [], - }, - "t5": SummaryBase { - "errorCount": 0, - "errors": [], - "pendingCount": 0, - "testCount": 0, - "valid": false, - "warnCount": 0, - "warnings": [], - }, - "t6": { - "errorCount": 2, - "errors": [], - "pendingCount": 0, - "testCount": 2, - "valid": false, - "warnCount": 0, - "warnings": [], - }, - }, - "valid": false, - "warnCount": 1, - "warnings": [ - SummaryFailure { - "fieldName": "t4", - "groupName": "g1", - "message": undefined, - }, - ], -} -`; diff --git a/packages/vest/src/core/test/__tests__/__snapshots__/IsolateTest.test.ts.snap b/packages/vest/src/core/test/__tests__/__snapshots__/IsolateTest.test.ts.snap index 5c1505986..e2772cba1 100644 --- a/packages/vest/src/core/test/__tests__/__snapshots__/IsolateTest.test.ts.snap +++ b/packages/vest/src/core/test/__tests__/__snapshots__/IsolateTest.test.ts.snap @@ -37,41 +37,3 @@ exports[`IsolateTest > testObject.warn > Should mark the test as warning 1`] = ` "status": "UNTESTED", } `; - -exports[`IsolateTest TestObject constructor 1`] = ` -{ - "$type": "UnitTest", - "children": [], - "data": { - "fieldName": "unicycle", - "message": "I am Root.", - "severity": "error", - "testFn": [MockFunction], - "type": "Test", - }, - "key": null, - "keys": {}, - "output": null, - "parent": null, - "status": "UNTESTED", -} -`; - -exports[`IsolateTest testObject.warn Should mark the test as warning 1`] = ` -{ - "$type": "UnitTest", - "children": [], - "data": { - "fieldName": "unicycle", - "message": "I am Root.", - "severity": "warning", - "testFn": [MockFunction], - "type": "Test", - }, - "key": null, - "keys": {}, - "output": null, - "parent": null, - "status": "UNTESTED", -} -`; diff --git a/packages/vest/src/core/test/__tests__/__snapshots__/memo.test.ts.snap b/packages/vest/src/core/test/__tests__/__snapshots__/memo.test.ts.snap index 9460858f7..ac111b588 100644 --- a/packages/vest/src/core/test/__tests__/__snapshots__/memo.test.ts.snap +++ b/packages/vest/src/core/test/__tests__/__snapshots__/memo.test.ts.snap @@ -145,149 +145,3 @@ exports[`test.memo > cache hit > sync > Should restore previous result on re-run ], } `; - -exports[`test.memo cache hit Should produce correct initial result 1`] = ` -{ - "done": [Function], - "errorCount": 1, - "errors": [ - SummaryFailure { - "fieldName": "field1", - "groupName": undefined, - "message": "msg1", - }, - ], - "getError": [Function], - "getErrors": [Function], - "getErrorsByGroup": [Function], - "getMessage": [Function], - "getWarning": [Function], - "getWarnings": [Function], - "getWarningsByGroup": [Function], - "groups": {}, - "hasErrors": [Function], - "hasErrorsByGroup": [Function], - "hasWarnings": [Function], - "hasWarningsByGroup": [Function], - "isPending": [Function], - "isTested": [Function], - "isValid": [Function], - "isValidByGroup": [Function], - "pendingCount": 0, - "suiteName": undefined, - "testCount": 4, - "tests": { - "field1": { - "errorCount": 1, - "errors": [ - "msg1", - ], - "pendingCount": 0, - "testCount": 2, - "valid": false, - "warnCount": 0, - "warnings": [], - }, - "field2": SummaryBase { - "errorCount": 0, - "errors": [], - "pendingCount": 0, - "testCount": 1, - "valid": true, - "warnCount": 0, - "warnings": [], - }, - "field3": SummaryBase { - "errorCount": 0, - "errors": [], - "pendingCount": 0, - "testCount": 1, - "valid": true, - "warnCount": 1, - "warnings": [], - }, - }, - "valid": false, - "warnCount": 1, - "warnings": [ - SummaryFailure { - "fieldName": "field3", - "groupName": undefined, - "message": undefined, - }, - ], -} -`; - -exports[`test.memo cache hit sync Should restore previous result on re-run 1`] = ` -{ - "done": [Function], - "errorCount": 1, - "errors": [ - SummaryFailure { - "fieldName": "field1", - "groupName": undefined, - "message": "msg1", - }, - ], - "getError": [Function], - "getErrors": [Function], - "getErrorsByGroup": [Function], - "getMessage": [Function], - "getWarning": [Function], - "getWarnings": [Function], - "getWarningsByGroup": [Function], - "groups": {}, - "hasErrors": [Function], - "hasErrorsByGroup": [Function], - "hasWarnings": [Function], - "hasWarningsByGroup": [Function], - "isPending": [Function], - "isTested": [Function], - "isValid": [Function], - "isValidByGroup": [Function], - "pendingCount": 0, - "suiteName": undefined, - "testCount": 4, - "tests": { - "field1": { - "errorCount": 1, - "errors": [ - "msg1", - ], - "pendingCount": 0, - "testCount": 2, - "valid": false, - "warnCount": 0, - "warnings": [], - }, - "field2": SummaryBase { - "errorCount": 0, - "errors": [], - "pendingCount": 0, - "testCount": 1, - "valid": true, - "warnCount": 0, - "warnings": [], - }, - "field3": SummaryBase { - "errorCount": 0, - "errors": [], - "pendingCount": 0, - "testCount": 1, - "valid": true, - "warnCount": 1, - "warnings": [], - }, - }, - "valid": false, - "warnCount": 1, - "warnings": [ - SummaryFailure { - "fieldName": "field3", - "groupName": undefined, - "message": undefined, - }, - ], -} -`; diff --git a/packages/vest/src/core/test/__tests__/__snapshots__/test.test.ts.snap b/packages/vest/src/core/test/__tests__/__snapshots__/test.test.ts.snap index 6f5c24f21..3fa46eb27 100644 --- a/packages/vest/src/core/test/__tests__/__snapshots__/test.test.ts.snap +++ b/packages/vest/src/core/test/__tests__/__snapshots__/test.test.ts.snap @@ -217,221 +217,3 @@ exports[`Test Vest's \`test\` function > test params > creates a test without a "status": "PASSING", } `; - -exports[`Test Vest's \`test\` function test params creates a test with a message and with a key 1`] = `"[{"$type":"Test","data":{"severity":"error","fieldName":"field_name","message":"failure message"},"status":"PASSING","key":"keyboardcat"},{}]"`; - -exports[`Test Vest's \`test\` function test params creates a test without a key 1`] = ` -{ - "$type": "Test", - "abortController": AbortController {}, - "allowReorder": undefined, - "children": null, - "data": { - "fieldName": "field_name", - "message": "failure message", - "severity": "error", - "testFn": [Function], - }, - "key": null, - "keys": null, - "output": undefined, - "parent": { - "$type": "Suite", - "abortController": AbortController {}, - "allowReorder": undefined, - "children": [ - [Circular], - ], - "data": { - "optional": {}, - }, - "key": null, - "keys": null, - "output": { - "done": [Function], - "errorCount": 0, - "errors": [], - "getError": [Function], - "getErrors": [Function], - "getErrorsByGroup": [Function], - "getMessage": [Function], - "getWarning": [Function], - "getWarnings": [Function], - "getWarningsByGroup": [Function], - "groups": {}, - "hasErrors": [Function], - "hasErrorsByGroup": [Function], - "hasWarnings": [Function], - "hasWarningsByGroup": [Function], - "isPending": [Function], - "isTested": [Function], - "isValid": [Function], - "isValidByGroup": [Function], - "pendingCount": 0, - "suiteName": undefined, - "testCount": 1, - "tests": { - "field_name": SummaryBase { - "errorCount": 0, - "errors": [], - "pendingCount": 0, - "testCount": 1, - "valid": true, - "warnCount": 0, - "warnings": [], - }, - }, - "valid": true, - "warnCount": 0, - "warnings": [], - }, - "parent": null, - "status": "DONE", - }, - "status": "PASSING", -} -`; - -exports[`Test Vest's \`test\` function test params creates a test without a message and with a key 1`] = ` -{ - "$type": "Test", - "abortController": AbortController {}, - "allowReorder": undefined, - "children": null, - "data": { - "fieldName": "field_name", - "severity": "error", - "testFn": [Function], - }, - "key": "keyboardcat", - "keys": null, - "output": undefined, - "parent": { - "$type": "Suite", - "abortController": AbortController {}, - "allowReorder": undefined, - "children": [ - [Circular], - ], - "data": { - "optional": {}, - }, - "key": null, - "keys": { - "keyboardcat": [Circular], - }, - "output": { - "done": [Function], - "errorCount": 0, - "errors": [], - "getError": [Function], - "getErrors": [Function], - "getErrorsByGroup": [Function], - "getMessage": [Function], - "getWarning": [Function], - "getWarnings": [Function], - "getWarningsByGroup": [Function], - "groups": {}, - "hasErrors": [Function], - "hasErrorsByGroup": [Function], - "hasWarnings": [Function], - "hasWarningsByGroup": [Function], - "isPending": [Function], - "isTested": [Function], - "isValid": [Function], - "isValidByGroup": [Function], - "pendingCount": 0, - "suiteName": undefined, - "testCount": 1, - "tests": { - "field_name": SummaryBase { - "errorCount": 0, - "errors": [], - "pendingCount": 0, - "testCount": 1, - "valid": true, - "warnCount": 0, - "warnings": [], - }, - }, - "valid": true, - "warnCount": 0, - "warnings": [], - }, - "parent": null, - "status": "DONE", - }, - "status": "PASSING", -} -`; - -exports[`Test Vest's \`test\` function test params creates a test without a message and without a key 1`] = ` -{ - "$type": "Test", - "abortController": AbortController {}, - "allowReorder": undefined, - "children": null, - "data": { - "fieldName": "field_name", - "severity": "error", - "testFn": [Function], - }, - "key": null, - "keys": null, - "output": undefined, - "parent": { - "$type": "Suite", - "abortController": AbortController {}, - "allowReorder": undefined, - "children": [ - [Circular], - ], - "data": { - "optional": {}, - }, - "key": null, - "keys": null, - "output": { - "done": [Function], - "errorCount": 0, - "errors": [], - "getError": [Function], - "getErrors": [Function], - "getErrorsByGroup": [Function], - "getMessage": [Function], - "getWarning": [Function], - "getWarnings": [Function], - "getWarningsByGroup": [Function], - "groups": {}, - "hasErrors": [Function], - "hasErrorsByGroup": [Function], - "hasWarnings": [Function], - "hasWarningsByGroup": [Function], - "isPending": [Function], - "isTested": [Function], - "isValid": [Function], - "isValidByGroup": [Function], - "pendingCount": 0, - "suiteName": undefined, - "testCount": 1, - "tests": { - "field_name": SummaryBase { - "errorCount": 0, - "errors": [], - "pendingCount": 0, - "testCount": 1, - "valid": true, - "warnCount": 0, - "warnings": [], - }, - }, - "valid": true, - "warnCount": 0, - "warnings": [], - }, - "parent": null, - "status": "DONE", - }, - "status": "PASSING", -} -`; diff --git a/packages/vest/src/exports/__tests__/__snapshots__/SuiteSerializer.test.ts.snap b/packages/vest/src/exports/__tests__/__snapshots__/SuiteSerializer.test.ts.snap index dbc781ba3..a5a5fa44f 100644 --- a/packages/vest/src/exports/__tests__/__snapshots__/SuiteSerializer.test.ts.snap +++ b/packages/vest/src/exports/__tests__/__snapshots__/SuiteSerializer.test.ts.snap @@ -2,8 +2,6 @@ exports[`SuiteSerializer > Should produce a valid serialized dump 1`] = `"[{"0":"Suite","1":"9","2":{},"a":[{"0":"Focused","1":"9","2":{"focusMode":0,"match":["d"],"matchAll":false}},{"0":"3","1":"FAILED","2":{"4":"5","6":"d","7":"field_1_message"}},{"0":"3","1":"8","2":{"4":"5","6":"field_2","7":"field_2_message"}},{"0":"Group","1":"9","a":[{"0":"3","1":"8","2":{"4":"5","6":"e","7":"field_3_message_1","b":"c"}},{"0":"3","1":"8","2":{"4":"5","6":"e","7":"field_3_message_2","b":"c"}},{"0":"3","1":"8","2":{"4":"5","6":"field_4","7":"field_4_message","b":"c"}}]},{"0":"SkipWhen","1":"9","a":[{"0":"3","1":"8","2":{"4":"5","6":"field_5","7":"field_5_message"}}]}]},{"0":"$type","1":"status","2":"data","3":"Test","4":"severity","5":"error","6":"fieldName","7":"message","8":"SKIPPED","9":"DONE","a":"children","b":"groupName","c":"group_1","d":"field_1","e":"field_3"}]"`; -exports[`SuiteSerializer Should produce a valid serialized dump 1`] = `"[{"0":"Suite","1":"9","2":{},"a":[{"0":"Focused","1":"9","2":{"focusMode":0,"match":["d"],"matchAll":false}},{"0":"3","1":"FAILED","2":{"4":"5","6":"d","7":"field_1_message"}},{"0":"3","1":"8","2":{"4":"5","6":"field_2","7":"field_2_message"}},{"0":"Group","1":"9","a":[{"0":"3","1":"8","2":{"4":"5","6":"e","7":"field_3_message_1","b":"c"}},{"0":"3","1":"8","2":{"4":"5","6":"e","7":"field_3_message_2","b":"c"}},{"0":"3","1":"8","2":{"4":"5","6":"field_4","7":"field_4_message","b":"c"}}]},{"0":"SkipWhen","1":"9","a":[{"0":"3","1":"8","2":{"4":"5","6":"field_5","7":"field_5_message"}}]}]},{"0":"$type","1":"status","2":"data","3":"Test","4":"severity","5":"error","6":"fieldName","7":"message","8":"SKIPPED","9":"DONE","a":"children","b":"groupName","c":"group_1","d":"field_1","e":"field_3"}]"`; - exports[`suite.resume > Running the suite after resuming > Sanity - suite should run as expected > Should have correct state after resuming 1`] = ` { "field_1": [ @@ -14,14 +12,3 @@ exports[`suite.resume > Running the suite after resuming > Sanity - suite should ], } `; - -exports[`suite.resume Running the suite after resuming Sanity - suite should run as expected Should have correct state after resuming 1`] = ` -{ - "field_1": [ - "field_1_message", - ], - "field_2": [ - "field_2_message", - ], -} -`; diff --git a/packages/vest/src/hooks/__tests__/__snapshots__/include.test.ts.snap b/packages/vest/src/hooks/__tests__/__snapshots__/include.test.ts.snap index 2bd1ee47e..803f9c880 100644 --- a/packages/vest/src/hooks/__tests__/__snapshots__/include.test.ts.snap +++ b/packages/vest/src/hooks/__tests__/__snapshots__/include.test.ts.snap @@ -1064,1068 +1064,3 @@ exports[`include > When no \`skip\` or \`only\` > include().when has no effect 1 "warnings": [], } `; - -exports[`include Field is excluded via \`skip\` Should disregard \`include.when\` and avoid running the test 1`] = ` -{ - "done": [Function], - "errorCount": 1, - "errors": [ - SummaryFailure { - "fieldName": "field_2", - "groupName": undefined, - "message": undefined, - }, - ], - "getError": [Function], - "getErrors": [Function], - "getErrorsByGroup": [Function], - "getMessage": [Function], - "getWarning": [Function], - "getWarnings": [Function], - "getWarningsByGroup": [Function], - "groups": {}, - "hasErrors": [Function], - "hasErrorsByGroup": [Function], - "hasWarnings": [Function], - "hasWarningsByGroup": [Function], - "isPending": [Function], - "isTested": [Function], - "isValid": [Function], - "isValidByGroup": [Function], - "pendingCount": 0, - "suiteName": undefined, - "testCount": 1, - "tests": { - "field_1": SummaryBase { - "errorCount": 0, - "errors": [], - "pendingCount": 0, - "testCount": 0, - "valid": false, - "warnCount": 0, - "warnings": [], - }, - "field_2": SummaryBase { - "errorCount": 1, - "errors": [], - "pendingCount": 0, - "testCount": 1, - "valid": false, - "warnCount": 0, - "warnings": [], - }, - }, - "valid": false, - "warnCount": 0, - "warnings": [], -} -`; - -exports[`include Field is excluded via \`skip\` Should disregard \`include\` and avoid running the test 1`] = ` -{ - "done": [Function], - "errorCount": 1, - "errors": [ - SummaryFailure { - "fieldName": "field_2", - "groupName": undefined, - "message": undefined, - }, - ], - "getError": [Function], - "getErrors": [Function], - "getErrorsByGroup": [Function], - "getMessage": [Function], - "getWarning": [Function], - "getWarnings": [Function], - "getWarningsByGroup": [Function], - "groups": {}, - "hasErrors": [Function], - "hasErrorsByGroup": [Function], - "hasWarnings": [Function], - "hasWarningsByGroup": [Function], - "isPending": [Function], - "isTested": [Function], - "isValid": [Function], - "isValidByGroup": [Function], - "pendingCount": 0, - "suiteName": undefined, - "testCount": 1, - "tests": { - "field_1": SummaryBase { - "errorCount": 0, - "errors": [], - "pendingCount": 0, - "testCount": 0, - "valid": false, - "warnCount": 0, - "warnings": [], - }, - "field_2": SummaryBase { - "errorCount": 1, - "errors": [], - "pendingCount": 0, - "testCount": 1, - "valid": false, - "warnCount": 0, - "warnings": [], - }, - }, - "valid": false, - "warnCount": 0, - "warnings": [], -} -`; - -exports[`include Test is excluded via \`skip.group\` Should disregard \`include.when\` and avoid running the test 1`] = ` -{ - "done": [Function], - "errorCount": 1, - "errors": [ - SummaryFailure { - "fieldName": "field_1", - "groupName": undefined, - "message": undefined, - }, - ], - "getError": [Function], - "getErrors": [Function], - "getErrorsByGroup": [Function], - "getMessage": [Function], - "getWarning": [Function], - "getWarnings": [Function], - "getWarningsByGroup": [Function], - "groups": { - "g1": { - "field_1": SummaryBase { - "errorCount": 0, - "errors": [], - "pendingCount": 0, - "testCount": 0, - "valid": false, - "warnCount": 0, - "warnings": [], - }, - "field_2": SummaryBase { - "errorCount": 0, - "errors": [], - "pendingCount": 0, - "testCount": 0, - "valid": false, - "warnCount": 0, - "warnings": [], - }, - }, - }, - "hasErrors": [Function], - "hasErrorsByGroup": [Function], - "hasWarnings": [Function], - "hasWarningsByGroup": [Function], - "isPending": [Function], - "isTested": [Function], - "isValid": [Function], - "isValidByGroup": [Function], - "pendingCount": 0, - "suiteName": undefined, - "testCount": 1, - "tests": { - "field_1": { - "errorCount": 1, - "errors": [], - "pendingCount": 0, - "testCount": 1, - "valid": false, - "warnCount": 0, - "warnings": [], - }, - "field_2": SummaryBase { - "errorCount": 0, - "errors": [], - "pendingCount": 0, - "testCount": 0, - "valid": false, - "warnCount": 0, - "warnings": [], - }, - }, - "valid": false, - "warnCount": 0, - "warnings": [], -} -`; - -exports[`include Test is excluded via \`skip.group\` Should disregard \`include\` and avoid running the test 1`] = ` -{ - "done": [Function], - "errorCount": 1, - "errors": [ - SummaryFailure { - "fieldName": "field_1", - "groupName": undefined, - "message": undefined, - }, - ], - "getError": [Function], - "getErrors": [Function], - "getErrorsByGroup": [Function], - "getMessage": [Function], - "getWarning": [Function], - "getWarnings": [Function], - "getWarningsByGroup": [Function], - "groups": { - "g1": { - "field_1": SummaryBase { - "errorCount": 0, - "errors": [], - "pendingCount": 0, - "testCount": 0, - "valid": false, - "warnCount": 0, - "warnings": [], - }, - "field_2": SummaryBase { - "errorCount": 0, - "errors": [], - "pendingCount": 0, - "testCount": 0, - "valid": false, - "warnCount": 0, - "warnings": [], - }, - }, - }, - "hasErrors": [Function], - "hasErrorsByGroup": [Function], - "hasWarnings": [Function], - "hasWarningsByGroup": [Function], - "isPending": [Function], - "isTested": [Function], - "isValid": [Function], - "isValidByGroup": [Function], - "pendingCount": 0, - "suiteName": undefined, - "testCount": 1, - "tests": { - "field_1": { - "errorCount": 1, - "errors": [], - "pendingCount": 0, - "testCount": 1, - "valid": false, - "warnCount": 0, - "warnings": [], - }, - "field_2": SummaryBase { - "errorCount": 0, - "errors": [], - "pendingCount": 0, - "testCount": 0, - "valid": false, - "warnCount": 0, - "warnings": [], - }, - }, - "valid": false, - "warnCount": 0, - "warnings": [], -} -`; - -exports[`include Test is excluded via \`skipWhen\` Should disregard \`include.when\` and avoid running the matching tests 1`] = ` -{ - "done": [Function], - "errorCount": 1, - "errors": [ - SummaryFailure { - "fieldName": "field_1", - "groupName": undefined, - "message": undefined, - }, - ], - "getError": [Function], - "getErrors": [Function], - "getErrorsByGroup": [Function], - "getMessage": [Function], - "getWarning": [Function], - "getWarnings": [Function], - "getWarningsByGroup": [Function], - "groups": {}, - "hasErrors": [Function], - "hasErrorsByGroup": [Function], - "hasWarnings": [Function], - "hasWarningsByGroup": [Function], - "isPending": [Function], - "isTested": [Function], - "isValid": [Function], - "isValidByGroup": [Function], - "pendingCount": 0, - "suiteName": undefined, - "testCount": 1, - "tests": { - "field_1": { - "errorCount": 1, - "errors": [], - "pendingCount": 0, - "testCount": 1, - "valid": false, - "warnCount": 0, - "warnings": [], - }, - }, - "valid": false, - "warnCount": 0, - "warnings": [], -} -`; - -exports[`include Test is excluded via \`skipWhen\` Should disregard \`include\` and avoid running the matching tests 1`] = ` -{ - "done": [Function], - "errorCount": 1, - "errors": [ - SummaryFailure { - "fieldName": "field_1", - "groupName": undefined, - "message": undefined, - }, - ], - "getError": [Function], - "getErrors": [Function], - "getErrorsByGroup": [Function], - "getMessage": [Function], - "getWarning": [Function], - "getWarnings": [Function], - "getWarningsByGroup": [Function], - "groups": {}, - "hasErrors": [Function], - "hasErrorsByGroup": [Function], - "hasWarnings": [Function], - "hasWarningsByGroup": [Function], - "isPending": [Function], - "isTested": [Function], - "isValid": [Function], - "isValidByGroup": [Function], - "pendingCount": 0, - "suiteName": undefined, - "testCount": 1, - "tests": { - "field_1": { - "errorCount": 1, - "errors": [], - "pendingCount": 0, - "testCount": 1, - "valid": false, - "warnCount": 0, - "warnings": [], - }, - }, - "valid": false, - "warnCount": 0, - "warnings": [], -} -`; - -exports[`include There is an \`onlyd\` field \`include\` is run as-is without modifiers Should run the included test along with the onlyd test 1`] = ` -{ - "done": [Function], - "errorCount": 2, - "errors": [ - SummaryFailure { - "fieldName": "field_1", - "groupName": undefined, - "message": undefined, - }, - SummaryFailure { - "fieldName": "field_2", - "groupName": undefined, - "message": undefined, - }, - ], - "getError": [Function], - "getErrors": [Function], - "getErrorsByGroup": [Function], - "getMessage": [Function], - "getWarning": [Function], - "getWarnings": [Function], - "getWarningsByGroup": [Function], - "groups": {}, - "hasErrors": [Function], - "hasErrorsByGroup": [Function], - "hasWarnings": [Function], - "hasWarningsByGroup": [Function], - "isPending": [Function], - "isTested": [Function], - "isValid": [Function], - "isValidByGroup": [Function], - "pendingCount": 0, - "suiteName": undefined, - "testCount": 2, - "tests": { - "field_1": SummaryBase { - "errorCount": 1, - "errors": [], - "pendingCount": 0, - "testCount": 1, - "valid": false, - "warnCount": 0, - "warnings": [], - }, - "field_2": SummaryBase { - "errorCount": 1, - "errors": [], - "pendingCount": 0, - "testCount": 1, - "valid": false, - "warnCount": 0, - "warnings": [], - }, - }, - "valid": false, - "warnCount": 0, - "warnings": [], -} -`; - -exports[`include There is an \`onlyd\` field include().when() \`when\` param is a boolean when \`false\` Should skip run included field 1`] = ` -{ - "done": [Function], - "errorCount": 1, - "errors": [ - SummaryFailure { - "fieldName": "field_1", - "groupName": undefined, - "message": undefined, - }, - ], - "getError": [Function], - "getErrors": [Function], - "getErrorsByGroup": [Function], - "getMessage": [Function], - "getWarning": [Function], - "getWarnings": [Function], - "getWarningsByGroup": [Function], - "groups": {}, - "hasErrors": [Function], - "hasErrorsByGroup": [Function], - "hasWarnings": [Function], - "hasWarningsByGroup": [Function], - "isPending": [Function], - "isTested": [Function], - "isValid": [Function], - "isValidByGroup": [Function], - "pendingCount": 0, - "suiteName": undefined, - "testCount": 1, - "tests": { - "field_1": SummaryBase { - "errorCount": 1, - "errors": [], - "pendingCount": 0, - "testCount": 1, - "valid": false, - "warnCount": 0, - "warnings": [], - }, - "field_2": SummaryBase { - "errorCount": 0, - "errors": [], - "pendingCount": 0, - "testCount": 0, - "valid": false, - "warnCount": 0, - "warnings": [], - }, - "field_3": SummaryBase { - "errorCount": 0, - "errors": [], - "pendingCount": 0, - "testCount": 0, - "valid": false, - "warnCount": 0, - "warnings": [], - }, - }, - "valid": false, - "warnCount": 0, - "warnings": [], -} -`; - -exports[`include There is an \`onlyd\` field include().when() \`when\` param is a boolean when \`true\` Should run included field 1`] = ` -{ - "done": [Function], - "errorCount": 2, - "errors": [ - SummaryFailure { - "fieldName": "field_1", - "groupName": undefined, - "message": undefined, - }, - SummaryFailure { - "fieldName": "field_2", - "groupName": undefined, - "message": undefined, - }, - ], - "getError": [Function], - "getErrors": [Function], - "getErrorsByGroup": [Function], - "getMessage": [Function], - "getWarning": [Function], - "getWarnings": [Function], - "getWarningsByGroup": [Function], - "groups": {}, - "hasErrors": [Function], - "hasErrorsByGroup": [Function], - "hasWarnings": [Function], - "hasWarningsByGroup": [Function], - "isPending": [Function], - "isTested": [Function], - "isValid": [Function], - "isValidByGroup": [Function], - "pendingCount": 0, - "suiteName": undefined, - "testCount": 2, - "tests": { - "field_1": SummaryBase { - "errorCount": 1, - "errors": [], - "pendingCount": 0, - "testCount": 1, - "valid": false, - "warnCount": 0, - "warnings": [], - }, - "field_2": SummaryBase { - "errorCount": 1, - "errors": [], - "pendingCount": 0, - "testCount": 1, - "valid": false, - "warnCount": 0, - "warnings": [], - }, - "field_3": SummaryBase { - "errorCount": 0, - "errors": [], - "pendingCount": 0, - "testCount": 0, - "valid": false, - "warnCount": 0, - "warnings": [], - }, - }, - "valid": false, - "warnCount": 0, - "warnings": [], -} -`; - -exports[`include There is an \`onlyd\` field include().when() \`when\` param is a function Callback evaluation Should evaluate per test run 1`] = ` -{ - "done": [Function], - "errorCount": 2, - "errors": [ - SummaryFailure { - "fieldName": "field_1", - "groupName": undefined, - "message": undefined, - }, - SummaryFailure { - "fieldName": "field_1", - "groupName": undefined, - "message": undefined, - }, - ], - "getError": [Function], - "getErrors": [Function], - "getErrorsByGroup": [Function], - "getMessage": [Function], - "getWarning": [Function], - "getWarnings": [Function], - "getWarningsByGroup": [Function], - "groups": {}, - "hasErrors": [Function], - "hasErrorsByGroup": [Function], - "hasWarnings": [Function], - "hasWarningsByGroup": [Function], - "isPending": [Function], - "isTested": [Function], - "isValid": [Function], - "isValidByGroup": [Function], - "pendingCount": 0, - "suiteName": undefined, - "testCount": 2, - "tests": { - "field_1": { - "errorCount": 2, - "errors": [], - "pendingCount": 0, - "testCount": 2, - "valid": false, - "warnCount": 0, - "warnings": [], - }, - }, - "valid": false, - "warnCount": 0, - "warnings": [], -} -`; - -exports[`include There is an \`onlyd\` field include().when() \`when\` param is a function when returning\`false\` Should skip run included field 1`] = ` -{ - "done": [Function], - "errorCount": 1, - "errors": [ - SummaryFailure { - "fieldName": "field_1", - "groupName": undefined, - "message": undefined, - }, - ], - "getError": [Function], - "getErrors": [Function], - "getErrorsByGroup": [Function], - "getMessage": [Function], - "getWarning": [Function], - "getWarnings": [Function], - "getWarningsByGroup": [Function], - "groups": {}, - "hasErrors": [Function], - "hasErrorsByGroup": [Function], - "hasWarnings": [Function], - "hasWarningsByGroup": [Function], - "isPending": [Function], - "isTested": [Function], - "isValid": [Function], - "isValidByGroup": [Function], - "pendingCount": 0, - "suiteName": undefined, - "testCount": 1, - "tests": { - "field_1": SummaryBase { - "errorCount": 1, - "errors": [], - "pendingCount": 0, - "testCount": 1, - "valid": false, - "warnCount": 0, - "warnings": [], - }, - "field_2": SummaryBase { - "errorCount": 0, - "errors": [], - "pendingCount": 0, - "testCount": 0, - "valid": false, - "warnCount": 0, - "warnings": [], - }, - "field_3": SummaryBase { - "errorCount": 0, - "errors": [], - "pendingCount": 0, - "testCount": 0, - "valid": false, - "warnCount": 0, - "warnings": [], - }, - }, - "valid": false, - "warnCount": 0, - "warnings": [], -} -`; - -exports[`include There is an \`onlyd\` field include().when() \`when\` param is a function when returning \`true\` Should run included field 1`] = ` -{ - "done": [Function], - "errorCount": 2, - "errors": [ - SummaryFailure { - "fieldName": "field_1", - "groupName": undefined, - "message": undefined, - }, - SummaryFailure { - "fieldName": "field_2", - "groupName": undefined, - "message": undefined, - }, - ], - "getError": [Function], - "getErrors": [Function], - "getErrorsByGroup": [Function], - "getMessage": [Function], - "getWarning": [Function], - "getWarnings": [Function], - "getWarningsByGroup": [Function], - "groups": {}, - "hasErrors": [Function], - "hasErrorsByGroup": [Function], - "hasWarnings": [Function], - "hasWarningsByGroup": [Function], - "isPending": [Function], - "isTested": [Function], - "isValid": [Function], - "isValidByGroup": [Function], - "pendingCount": 0, - "suiteName": undefined, - "testCount": 2, - "tests": { - "field_1": SummaryBase { - "errorCount": 1, - "errors": [], - "pendingCount": 0, - "testCount": 1, - "valid": false, - "warnCount": 0, - "warnings": [], - }, - "field_2": SummaryBase { - "errorCount": 1, - "errors": [], - "pendingCount": 0, - "testCount": 1, - "valid": false, - "warnCount": 0, - "warnings": [], - }, - "field_3": SummaryBase { - "errorCount": 0, - "errors": [], - "pendingCount": 0, - "testCount": 0, - "valid": false, - "warnCount": 0, - "warnings": [], - }, - }, - "valid": false, - "warnCount": 0, - "warnings": [], -} -`; - -exports[`include There is an \`onlyd\` field include().when() \`when\` param is a string \`when\` param is a name of a non-included field Should avoid running the included field 1`] = ` -{ - "done": [Function], - "errorCount": 1, - "errors": [ - SummaryFailure { - "fieldName": "field_1", - "groupName": undefined, - "message": undefined, - }, - ], - "getError": [Function], - "getErrors": [Function], - "getErrorsByGroup": [Function], - "getMessage": [Function], - "getWarning": [Function], - "getWarnings": [Function], - "getWarningsByGroup": [Function], - "groups": {}, - "hasErrors": [Function], - "hasErrorsByGroup": [Function], - "hasWarnings": [Function], - "hasWarningsByGroup": [Function], - "isPending": [Function], - "isTested": [Function], - "isValid": [Function], - "isValidByGroup": [Function], - "pendingCount": 0, - "suiteName": undefined, - "testCount": 1, - "tests": { - "field_1": SummaryBase { - "errorCount": 1, - "errors": [], - "pendingCount": 0, - "testCount": 1, - "valid": false, - "warnCount": 0, - "warnings": [], - }, - "field_2": SummaryBase { - "errorCount": 0, - "errors": [], - "pendingCount": 0, - "testCount": 0, - "valid": false, - "warnCount": 0, - "warnings": [], - }, - "field_3": SummaryBase { - "errorCount": 0, - "errors": [], - "pendingCount": 0, - "testCount": 0, - "valid": false, - "warnCount": 0, - "warnings": [], - }, - }, - "valid": false, - "warnCount": 0, - "warnings": [], -} -`; - -exports[`include There is an \`onlyd\` field include().when() \`when\` param is a string \`when\` param is a name of a skipped field Should avoid running the included field 1`] = ` -{ - "done": [Function], - "errorCount": 1, - "errors": [ - SummaryFailure { - "fieldName": "field_1", - "groupName": undefined, - "message": undefined, - }, - ], - "getError": [Function], - "getErrors": [Function], - "getErrorsByGroup": [Function], - "getMessage": [Function], - "getWarning": [Function], - "getWarnings": [Function], - "getWarningsByGroup": [Function], - "groups": {}, - "hasErrors": [Function], - "hasErrorsByGroup": [Function], - "hasWarnings": [Function], - "hasWarningsByGroup": [Function], - "isPending": [Function], - "isTested": [Function], - "isValid": [Function], - "isValidByGroup": [Function], - "pendingCount": 0, - "suiteName": undefined, - "testCount": 1, - "tests": { - "field_1": SummaryBase { - "errorCount": 1, - "errors": [], - "pendingCount": 0, - "testCount": 1, - "valid": false, - "warnCount": 0, - "warnings": [], - }, - "field_2": SummaryBase { - "errorCount": 0, - "errors": [], - "pendingCount": 0, - "testCount": 0, - "valid": false, - "warnCount": 0, - "warnings": [], - }, - "field_3": SummaryBase { - "errorCount": 0, - "errors": [], - "pendingCount": 0, - "testCount": 0, - "valid": false, - "warnCount": 0, - "warnings": [], - }, - }, - "valid": false, - "warnCount": 0, - "warnings": [], -} -`; - -exports[`include There is an \`onlyd\` field include().when() \`when\` param is a string \`when\` param is a name of an onlyd field Should run included field along with the onlyd field 1`] = ` -{ - "done": [Function], - "errorCount": 2, - "errors": [ - SummaryFailure { - "fieldName": "field_1", - "groupName": undefined, - "message": undefined, - }, - SummaryFailure { - "fieldName": "field_2", - "groupName": undefined, - "message": undefined, - }, - ], - "getError": [Function], - "getErrors": [Function], - "getErrorsByGroup": [Function], - "getMessage": [Function], - "getWarning": [Function], - "getWarnings": [Function], - "getWarningsByGroup": [Function], - "groups": {}, - "hasErrors": [Function], - "hasErrorsByGroup": [Function], - "hasWarnings": [Function], - "hasWarningsByGroup": [Function], - "isPending": [Function], - "isTested": [Function], - "isValid": [Function], - "isValidByGroup": [Function], - "pendingCount": 0, - "suiteName": undefined, - "testCount": 2, - "tests": { - "field_1": SummaryBase { - "errorCount": 1, - "errors": [], - "pendingCount": 0, - "testCount": 1, - "valid": false, - "warnCount": 0, - "warnings": [], - }, - "field_2": SummaryBase { - "errorCount": 1, - "errors": [], - "pendingCount": 0, - "testCount": 1, - "valid": false, - "warnCount": 0, - "warnings": [], - }, - "field_3": SummaryBase { - "errorCount": 0, - "errors": [], - "pendingCount": 0, - "testCount": 0, - "valid": false, - "warnCount": 0, - "warnings": [], - }, - }, - "valid": false, - "warnCount": 0, - "warnings": [], -} -`; - -exports[`include When no \`skip\` or \`only\` include has no effect 1`] = ` -{ - "done": [Function], - "errorCount": 2, - "errors": [ - SummaryFailure { - "fieldName": "field_1", - "groupName": undefined, - "message": undefined, - }, - SummaryFailure { - "fieldName": "field_2", - "groupName": undefined, - "message": undefined, - }, - ], - "getError": [Function], - "getErrors": [Function], - "getErrorsByGroup": [Function], - "getMessage": [Function], - "getWarning": [Function], - "getWarnings": [Function], - "getWarningsByGroup": [Function], - "groups": {}, - "hasErrors": [Function], - "hasErrorsByGroup": [Function], - "hasWarnings": [Function], - "hasWarningsByGroup": [Function], - "isPending": [Function], - "isTested": [Function], - "isValid": [Function], - "isValidByGroup": [Function], - "pendingCount": 0, - "suiteName": undefined, - "testCount": 2, - "tests": { - "field_1": SummaryBase { - "errorCount": 1, - "errors": [], - "pendingCount": 0, - "testCount": 1, - "valid": false, - "warnCount": 0, - "warnings": [], - }, - "field_2": SummaryBase { - "errorCount": 1, - "errors": [], - "pendingCount": 0, - "testCount": 1, - "valid": false, - "warnCount": 0, - "warnings": [], - }, - }, - "valid": false, - "warnCount": 0, - "warnings": [], -} -`; - -exports[`include When no \`skip\` or \`only\` include().when has no effect 1`] = ` -{ - "done": [Function], - "errorCount": 2, - "errors": [ - SummaryFailure { - "fieldName": "field_1", - "groupName": undefined, - "message": undefined, - }, - SummaryFailure { - "fieldName": "field_2", - "groupName": undefined, - "message": undefined, - }, - ], - "getError": [Function], - "getErrors": [Function], - "getErrorsByGroup": [Function], - "getMessage": [Function], - "getWarning": [Function], - "getWarnings": [Function], - "getWarningsByGroup": [Function], - "groups": {}, - "hasErrors": [Function], - "hasErrorsByGroup": [Function], - "hasWarnings": [Function], - "hasWarningsByGroup": [Function], - "isPending": [Function], - "isTested": [Function], - "isValid": [Function], - "isValidByGroup": [Function], - "pendingCount": 0, - "suiteName": undefined, - "testCount": 2, - "tests": { - "field_1": SummaryBase { - "errorCount": 1, - "errors": [], - "pendingCount": 0, - "testCount": 1, - "valid": false, - "warnCount": 0, - "warnings": [], - }, - "field_2": SummaryBase { - "errorCount": 1, - "errors": [], - "pendingCount": 0, - "testCount": 1, - "valid": false, - "warnCount": 0, - "warnings": [], - }, - }, - "valid": false, - "warnCount": 0, - "warnings": [], -} -`; diff --git a/packages/vest/src/hooks/focused/__tests__/__snapshots__/focused.test.ts.snap b/packages/vest/src/hooks/focused/__tests__/__snapshots__/focused.test.ts.snap index 7b9cbd90b..ea0ac466a 100644 --- a/packages/vest/src/hooks/focused/__tests__/__snapshots__/focused.test.ts.snap +++ b/packages/vest/src/hooks/focused/__tests__/__snapshots__/focused.test.ts.snap @@ -163,167 +163,3 @@ Promise { "warnings": [], } `; - -exports[`Top Level Focus Top Level Skip When passing false Should run all fields 1`] = ` -Promise { - "done": [Function], - "dump": [Function], - "errorCount": 3, - "errors": [ - SummaryFailure { - "fieldName": "F1", - "groupName": undefined, - "message": "F1 error", - }, - SummaryFailure { - "fieldName": "F2", - "groupName": undefined, - "message": "F2 error", - }, - SummaryFailure { - "fieldName": "F3", - "groupName": undefined, - "message": "F3 error", - }, - ], - "getError": [Function], - "getErrors": [Function], - "getErrorsByGroup": [Function], - "getMessage": [Function], - "getWarning": [Function], - "getWarnings": [Function], - "getWarningsByGroup": [Function], - "groups": {}, - "hasErrors": [Function], - "hasErrorsByGroup": [Function], - "hasWarnings": [Function], - "hasWarningsByGroup": [Function], - "isPending": [Function], - "isTested": [Function], - "isValid": [Function], - "isValidByGroup": [Function], - "pendingCount": 0, - "suiteName": undefined, - "testCount": 3, - "tests": { - "F1": SummaryBase { - "errorCount": 1, - "errors": [ - "F1 error", - ], - "pendingCount": 0, - "testCount": 1, - "valid": false, - "warnCount": 0, - "warnings": [], - }, - "F2": SummaryBase { - "errorCount": 1, - "errors": [ - "F2 error", - ], - "pendingCount": 0, - "testCount": 1, - "valid": false, - "warnCount": 0, - "warnings": [], - }, - "F3": SummaryBase { - "errorCount": 1, - "errors": [ - "F3 error", - ], - "pendingCount": 0, - "testCount": 1, - "valid": false, - "warnCount": 0, - "warnings": [], - }, - }, - "valid": false, - "warnCount": 0, - "warnings": [], -} -`; - -exports[`Top Level Focus Top Level Skip When passing undefined Should run all fields 1`] = ` -Promise { - "done": [Function], - "dump": [Function], - "errorCount": 3, - "errors": [ - SummaryFailure { - "fieldName": "F1", - "groupName": undefined, - "message": "F1 error", - }, - SummaryFailure { - "fieldName": "F2", - "groupName": undefined, - "message": "F2 error", - }, - SummaryFailure { - "fieldName": "F3", - "groupName": undefined, - "message": "F3 error", - }, - ], - "getError": [Function], - "getErrors": [Function], - "getErrorsByGroup": [Function], - "getMessage": [Function], - "getWarning": [Function], - "getWarnings": [Function], - "getWarningsByGroup": [Function], - "groups": {}, - "hasErrors": [Function], - "hasErrorsByGroup": [Function], - "hasWarnings": [Function], - "hasWarningsByGroup": [Function], - "isPending": [Function], - "isTested": [Function], - "isValid": [Function], - "isValidByGroup": [Function], - "pendingCount": 0, - "suiteName": undefined, - "testCount": 3, - "tests": { - "F1": SummaryBase { - "errorCount": 1, - "errors": [ - "F1 error", - ], - "pendingCount": 0, - "testCount": 1, - "valid": false, - "warnCount": 0, - "warnings": [], - }, - "F2": SummaryBase { - "errorCount": 1, - "errors": [ - "F2 error", - ], - "pendingCount": 0, - "testCount": 1, - "valid": false, - "warnCount": 0, - "warnings": [], - }, - "F3": SummaryBase { - "errorCount": 1, - "errors": [ - "F3 error", - ], - "pendingCount": 0, - "testCount": 1, - "valid": false, - "warnCount": 0, - "warnings": [], - }, - }, - "valid": false, - "warnCount": 0, - "warnings": [], -} -`; diff --git a/packages/vest/src/isolates/__tests__/__snapshots__/each.test.ts.snap b/packages/vest/src/isolates/__tests__/__snapshots__/each.test.ts.snap index bd6f47e81..e1bd5009f 100644 --- a/packages/vest/src/isolates/__tests__/__snapshots__/each.test.ts.snap +++ b/packages/vest/src/isolates/__tests__/__snapshots__/each.test.ts.snap @@ -1,5 +1,3 @@ // Vitest Snapshot v1, https://vitest.dev/guide/snapshot.html exports[`each > When callback is not a function > should throw 1`] = `[Error: Each must be called with a function]`; - -exports[`each When callback is not a function should throw 1`] = `"Each must be called with a function"`; diff --git a/packages/vest/src/isolates/__tests__/__snapshots__/group.test.ts.snap b/packages/vest/src/isolates/__tests__/__snapshots__/group.test.ts.snap index af7e652e3..d2b3b45de 100644 --- a/packages/vest/src/isolates/__tests__/__snapshots__/group.test.ts.snap +++ b/packages/vest/src/isolates/__tests__/__snapshots__/group.test.ts.snap @@ -902,1248 +902,7 @@ SuiteSummary { } `; -exports[`named group Focus only group only Should skip all tests except \`only\` tests within the group 1`] = ` -SuiteSummary { - "errorCount": 4, - "errors": [ - SummaryFailure { - "fieldName": "f1", - "groupName": "g1", - "message": undefined, - }, - SummaryFailure { - "fieldName": "f1", - "groupName": "g2", - "message": undefined, - }, - SummaryFailure { - "fieldName": "f2", - "groupName": "g2", - "message": undefined, - }, - SummaryFailure { - "fieldName": "f3", - "groupName": "g2", - "message": undefined, - }, - ], - "getError": [Function], - "getErrors": [Function], - "getErrorsByGroup": [Function], - "getMessage": [Function], - "getWarning": [Function], - "getWarnings": [Function], - "getWarningsByGroup": [Function], - "groups": { - "g1": { - "f1": SummaryBase { - "errorCount": 1, - "errors": [], - "pendingCount": 0, - "testCount": 1, - "valid": false, - "warnCount": 0, - "warnings": [], - }, - "f2": SummaryBase { - "errorCount": 0, - "errors": [], - "pendingCount": 0, - "testCount": 0, - "valid": false, - "warnCount": 0, - "warnings": [], - }, - "f3": SummaryBase { - "errorCount": 0, - "errors": [], - "pendingCount": 0, - "testCount": 0, - "valid": false, - "warnCount": 0, - "warnings": [], - }, - }, - "g2": { - "f1": SummaryBase { - "errorCount": 1, - "errors": [], - "pendingCount": 0, - "testCount": 1, - "valid": false, - "warnCount": 0, - "warnings": [], - }, - "f2": SummaryBase { - "errorCount": 1, - "errors": [], - "pendingCount": 0, - "testCount": 1, - "valid": false, - "warnCount": 0, - "warnings": [], - }, - "f3": SummaryBase { - "errorCount": 1, - "errors": [], - "pendingCount": 0, - "testCount": 1, - "valid": false, - "warnCount": 0, - "warnings": [], - }, - }, - }, - "hasErrors": [Function], - "hasErrorsByGroup": [Function], - "hasWarnings": [Function], - "hasWarningsByGroup": [Function], - "isPending": [Function], - "isTested": [Function], - "isValid": [Function], - "isValidByGroup": [Function], - "pendingCount": 0, - "suiteName": undefined, - "testCount": 4, - "tests": { - "f1": { - "errorCount": 2, - "errors": [], - "pendingCount": 0, - "testCount": 2, - "valid": false, - "warnCount": 0, - "warnings": [], - }, - "f2": { - "errorCount": 1, - "errors": [], - "pendingCount": 0, - "testCount": 1, - "valid": false, - "warnCount": 0, - "warnings": [], - }, - "f3": { - "errorCount": 1, - "errors": [], - "pendingCount": 0, - "testCount": 1, - "valid": false, - "warnCount": 0, - "warnings": [], - }, - }, - "valid": false, - "warnCount": 0, - "warnings": [], -} -`; - -exports[`named group Focus only top level only should skip all tests except \`only\` tests 1`] = ` -SuiteSummary { - "errorCount": 3, - "errors": [ - SummaryFailure { - "fieldName": "f1", - "groupName": undefined, - "message": undefined, - }, - SummaryFailure { - "fieldName": "f1", - "groupName": "g1", - "message": undefined, - }, - SummaryFailure { - "fieldName": "f1", - "groupName": "g2", - "message": undefined, - }, - ], - "getError": [Function], - "getErrors": [Function], - "getErrorsByGroup": [Function], - "getMessage": [Function], - "getWarning": [Function], - "getWarnings": [Function], - "getWarningsByGroup": [Function], - "groups": { - "g1": { - "f1": SummaryBase { - "errorCount": 1, - "errors": [], - "pendingCount": 0, - "testCount": 1, - "valid": false, - "warnCount": 0, - "warnings": [], - }, - "f2": SummaryBase { - "errorCount": 0, - "errors": [], - "pendingCount": 0, - "testCount": 0, - "valid": false, - "warnCount": 0, - "warnings": [], - }, - "f3": SummaryBase { - "errorCount": 0, - "errors": [], - "pendingCount": 0, - "testCount": 0, - "valid": false, - "warnCount": 0, - "warnings": [], - }, - }, - "g2": { - "f1": SummaryBase { - "errorCount": 1, - "errors": [], - "pendingCount": 0, - "testCount": 1, - "valid": false, - "warnCount": 0, - "warnings": [], - }, - "f2": SummaryBase { - "errorCount": 0, - "errors": [], - "pendingCount": 0, - "testCount": 0, - "valid": false, - "warnCount": 0, - "warnings": [], - }, - "f3": SummaryBase { - "errorCount": 0, - "errors": [], - "pendingCount": 0, - "testCount": 0, - "valid": false, - "warnCount": 0, - "warnings": [], - }, - }, - }, - "hasErrors": [Function], - "hasErrorsByGroup": [Function], - "hasWarnings": [Function], - "hasWarningsByGroup": [Function], - "isPending": [Function], - "isTested": [Function], - "isValid": [Function], - "isValidByGroup": [Function], - "pendingCount": 0, - "suiteName": undefined, - "testCount": 3, - "tests": { - "f1": { - "errorCount": 3, - "errors": [], - "pendingCount": 0, - "testCount": 3, - "valid": false, - "warnCount": 0, - "warnings": [], - }, - "f2": { - "errorCount": 0, - "errors": [], - "pendingCount": 0, - "testCount": 0, - "valid": false, - "warnCount": 0, - "warnings": [], - }, - "f3": { - "errorCount": 0, - "errors": [], - "pendingCount": 0, - "testCount": 0, - "valid": false, - "warnCount": 0, - "warnings": [], - }, - }, - "valid": false, - "warnCount": 0, - "warnings": [], -} -`; - -exports[`named group Focus skip inside the group should skip only within the group 1`] = ` -SuiteSummary { - "errorCount": 3, - "errors": [ - SummaryFailure { - "fieldName": "f1", - "groupName": undefined, - "message": undefined, - }, - SummaryFailure { - "fieldName": "f1", - "groupName": "g1", - "message": undefined, - }, - SummaryFailure { - "fieldName": "f2", - "groupName": undefined, - "message": undefined, - }, - ], - "getError": [Function], - "getErrors": [Function], - "getErrorsByGroup": [Function], - "getMessage": [Function], - "getWarning": [Function], - "getWarnings": [Function], - "getWarningsByGroup": [Function], - "groups": { - "g1": { - "f1": SummaryBase { - "errorCount": 1, - "errors": [], - "pendingCount": 0, - "testCount": 1, - "valid": false, - "warnCount": 0, - "warnings": [], - }, - "f2": SummaryBase { - "errorCount": 0, - "errors": [], - "pendingCount": 0, - "testCount": 0, - "valid": false, - "warnCount": 0, - "warnings": [], - }, - }, - }, - "hasErrors": [Function], - "hasErrorsByGroup": [Function], - "hasWarnings": [Function], - "hasWarningsByGroup": [Function], - "isPending": [Function], - "isTested": [Function], - "isValid": [Function], - "isValidByGroup": [Function], - "pendingCount": 0, - "suiteName": undefined, - "testCount": 3, - "tests": { - "f1": { - "errorCount": 2, - "errors": [], - "pendingCount": 0, - "testCount": 2, - "valid": false, - "warnCount": 0, - "warnings": [], - }, - "f2": { - "errorCount": 1, - "errors": [], - "pendingCount": 0, - "testCount": 1, - "valid": false, - "warnCount": 0, - "warnings": [], - }, - }, - "valid": false, - "warnCount": 0, - "warnings": [], -} -`; - -exports[`named group Focus skip inside the group should skip only within the group, not the next group 1`] = ` -SuiteSummary { - "errorCount": 3, - "errors": [ - SummaryFailure { - "fieldName": "f1", - "groupName": undefined, - "message": undefined, - }, - SummaryFailure { - "fieldName": "f1", - "groupName": "g1", - "message": undefined, - }, - SummaryFailure { - "fieldName": "f2", - "groupName": "g2", - "message": undefined, - }, - ], - "getError": [Function], - "getErrors": [Function], - "getErrorsByGroup": [Function], - "getMessage": [Function], - "getWarning": [Function], - "getWarnings": [Function], - "getWarningsByGroup": [Function], - "groups": { - "g1": { - "f1": SummaryBase { - "errorCount": 1, - "errors": [], - "pendingCount": 0, - "testCount": 1, - "valid": false, - "warnCount": 0, - "warnings": [], - }, - "f2": SummaryBase { - "errorCount": 0, - "errors": [], - "pendingCount": 0, - "testCount": 0, - "valid": false, - "warnCount": 0, - "warnings": [], - }, - }, - "g2": { - "f2": SummaryBase { - "errorCount": 1, - "errors": [], - "pendingCount": 0, - "testCount": 1, - "valid": false, - "warnCount": 0, - "warnings": [], - }, - }, - }, - "hasErrors": [Function], - "hasErrorsByGroup": [Function], - "hasWarnings": [Function], - "hasWarningsByGroup": [Function], - "isPending": [Function], - "isTested": [Function], - "isValid": [Function], - "isValidByGroup": [Function], - "pendingCount": 0, - "suiteName": undefined, - "testCount": 3, - "tests": { - "f1": { - "errorCount": 2, - "errors": [], - "pendingCount": 0, - "testCount": 2, - "valid": false, - "warnCount": 0, - "warnings": [], - }, - "f2": { - "errorCount": 1, - "errors": [], - "pendingCount": 0, - "testCount": 1, - "valid": false, - "warnCount": 0, - "warnings": [], - }, - }, - "valid": false, - "warnCount": 0, - "warnings": [], -} -`; - -exports[`named group Focus skip inside the group skip(true) should skip only within the group 1`] = ` -SuiteSummary { - "errorCount": 5, - "errors": [ - SummaryFailure { - "fieldName": "f2", - "groupName": "g2", - "message": undefined, - }, - SummaryFailure { - "fieldName": "f3", - "groupName": "g2", - "message": undefined, - }, - SummaryFailure { - "fieldName": "f1", - "groupName": undefined, - "message": undefined, - }, - SummaryFailure { - "fieldName": "f2", - "groupName": undefined, - "message": undefined, - }, - SummaryFailure { - "fieldName": "f3", - "groupName": undefined, - "message": undefined, - }, - ], - "getError": [Function], - "getErrors": [Function], - "getErrorsByGroup": [Function], - "getMessage": [Function], - "getWarning": [Function], - "getWarnings": [Function], - "getWarningsByGroup": [Function], - "groups": { - "g1": { - "f1": SummaryBase { - "errorCount": 0, - "errors": [], - "pendingCount": 0, - "testCount": 0, - "valid": false, - "warnCount": 0, - "warnings": [], - }, - "f2": SummaryBase { - "errorCount": 0, - "errors": [], - "pendingCount": 0, - "testCount": 0, - "valid": false, - "warnCount": 0, - "warnings": [], - }, - }, - "g2": { - "f2": SummaryBase { - "errorCount": 1, - "errors": [], - "pendingCount": 0, - "testCount": 1, - "valid": false, - "warnCount": 0, - "warnings": [], - }, - "f3": SummaryBase { - "errorCount": 1, - "errors": [], - "pendingCount": 0, - "testCount": 1, - "valid": false, - "warnCount": 0, - "warnings": [], - }, - }, - }, - "hasErrors": [Function], - "hasErrorsByGroup": [Function], - "hasWarnings": [Function], - "hasWarningsByGroup": [Function], - "isPending": [Function], - "isTested": [Function], - "isValid": [Function], - "isValidByGroup": [Function], - "pendingCount": 0, - "suiteName": undefined, - "testCount": 5, - "tests": { - "f1": { - "errorCount": 1, - "errors": [], - "pendingCount": 0, - "testCount": 1, - "valid": false, - "warnCount": 0, - "warnings": [], - }, - "f2": { - "errorCount": 2, - "errors": [], - "pendingCount": 0, - "testCount": 2, - "valid": false, - "warnCount": 0, - "warnings": [], - }, - "f3": { - "errorCount": 2, - "errors": [], - "pendingCount": 0, - "testCount": 2, - "valid": false, - "warnCount": 0, - "warnings": [], - }, - }, - "valid": false, - "warnCount": 0, - "warnings": [], -} -`; - -exports[`named group Focus skip outside of group Should skip \`skipped\` tests both inside and outside the group 1`] = ` -SuiteSummary { - "errorCount": 1, - "errors": [ - SummaryFailure { - "fieldName": "f2", - "groupName": "g1", - "message": undefined, - }, - ], - "getError": [Function], - "getErrors": [Function], - "getErrorsByGroup": [Function], - "getMessage": [Function], - "getWarning": [Function], - "getWarnings": [Function], - "getWarningsByGroup": [Function], - "groups": { - "g1": { - "f1": SummaryBase { - "errorCount": 0, - "errors": [], - "pendingCount": 0, - "testCount": 0, - "valid": false, - "warnCount": 0, - "warnings": [], - }, - "f2": SummaryBase { - "errorCount": 1, - "errors": [], - "pendingCount": 0, - "testCount": 1, - "valid": false, - "warnCount": 0, - "warnings": [], - }, - }, - }, - "hasErrors": [Function], - "hasErrorsByGroup": [Function], - "hasWarnings": [Function], - "hasWarningsByGroup": [Function], - "isPending": [Function], - "isTested": [Function], - "isValid": [Function], - "isValidByGroup": [Function], - "pendingCount": 0, - "suiteName": undefined, - "testCount": 1, - "tests": { - "f1": { - "errorCount": 0, - "errors": [], - "pendingCount": 0, - "testCount": 0, - "valid": false, - "warnCount": 0, - "warnings": [], - }, - "f2": SummaryBase { - "errorCount": 1, - "errors": [], - "pendingCount": 0, - "testCount": 1, - "valid": false, - "warnCount": 0, - "warnings": [], - }, - }, - "valid": false, - "warnCount": 0, - "warnings": [], -} -`; - -exports[`named group Multiple groups Should run the tests within the groups 1`] = ` -SuiteSummary { - "errorCount": 5, - "errors": [ - SummaryFailure { - "fieldName": "f1", - "groupName": undefined, - "message": undefined, - }, - SummaryFailure { - "fieldName": "f1", - "groupName": "g1", - "message": undefined, - }, - SummaryFailure { - "fieldName": "f2", - "groupName": "g1", - "message": undefined, - }, - SummaryFailure { - "fieldName": "f1", - "groupName": "g2", - "message": undefined, - }, - SummaryFailure { - "fieldName": "f2", - "groupName": "g2", - "message": undefined, - }, - ], - "getError": [Function], - "getErrors": [Function], - "getErrorsByGroup": [Function], - "getMessage": [Function], - "getWarning": [Function], - "getWarnings": [Function], - "getWarningsByGroup": [Function], - "groups": { - "g1": { - "f1": SummaryBase { - "errorCount": 1, - "errors": [], - "pendingCount": 0, - "testCount": 1, - "valid": false, - "warnCount": 0, - "warnings": [], - }, - "f2": SummaryBase { - "errorCount": 1, - "errors": [], - "pendingCount": 0, - "testCount": 1, - "valid": false, - "warnCount": 0, - "warnings": [], - }, - "f3": SummaryBase { - "errorCount": 0, - "errors": [], - "pendingCount": 0, - "testCount": 1, - "valid": true, - "warnCount": 0, - "warnings": [], - }, - }, - "g2": { - "f1": SummaryBase { - "errorCount": 1, - "errors": [], - "pendingCount": 0, - "testCount": 1, - "valid": false, - "warnCount": 0, - "warnings": [], - }, - "f2": SummaryBase { - "errorCount": 1, - "errors": [], - "pendingCount": 0, - "testCount": 1, - "valid": false, - "warnCount": 0, - "warnings": [], - }, - "f3": SummaryBase { - "errorCount": 0, - "errors": [], - "pendingCount": 0, - "testCount": 1, - "valid": true, - "warnCount": 0, - "warnings": [], - }, - }, - }, - "hasErrors": [Function], - "hasErrorsByGroup": [Function], - "hasWarnings": [Function], - "hasWarningsByGroup": [Function], - "isPending": [Function], - "isTested": [Function], - "isValid": [Function], - "isValidByGroup": [Function], - "pendingCount": 0, - "suiteName": undefined, - "testCount": 7, - "tests": { - "f1": { - "errorCount": 3, - "errors": [], - "pendingCount": 0, - "testCount": 3, - "valid": false, - "warnCount": 0, - "warnings": [], - }, - "f2": { - "errorCount": 2, - "errors": [], - "pendingCount": 0, - "testCount": 2, - "valid": false, - "warnCount": 0, - "warnings": [], - }, - "f3": { - "errorCount": 0, - "errors": [], - "pendingCount": 0, - "testCount": 2, - "valid": true, - "warnCount": 0, - "warnings": [], - }, - }, - "valid": false, - "warnCount": 0, - "warnings": [], -} -`; - -exports[`named group Should run the tests within the group 1`] = ` -SuiteSummary { - "errorCount": 3, - "errors": [ - SummaryFailure { - "fieldName": "f1", - "groupName": undefined, - "message": undefined, - }, - SummaryFailure { - "fieldName": "f1", - "groupName": "g1", - "message": undefined, - }, - SummaryFailure { - "fieldName": "f2", - "groupName": "g1", - "message": undefined, - }, - ], - "getError": [Function], - "getErrors": [Function], - "getErrorsByGroup": [Function], - "getMessage": [Function], - "getWarning": [Function], - "getWarnings": [Function], - "getWarningsByGroup": [Function], - "groups": { - "g1": { - "f1": SummaryBase { - "errorCount": 1, - "errors": [], - "pendingCount": 0, - "testCount": 1, - "valid": false, - "warnCount": 0, - "warnings": [], - }, - "f2": SummaryBase { - "errorCount": 1, - "errors": [], - "pendingCount": 0, - "testCount": 1, - "valid": false, - "warnCount": 0, - "warnings": [], - }, - "f3": SummaryBase { - "errorCount": 0, - "errors": [], - "pendingCount": 0, - "testCount": 1, - "valid": true, - "warnCount": 0, - "warnings": [], - }, - }, - }, - "hasErrors": [Function], - "hasErrorsByGroup": [Function], - "hasWarnings": [Function], - "hasWarningsByGroup": [Function], - "isPending": [Function], - "isTested": [Function], - "isValid": [Function], - "isValidByGroup": [Function], - "pendingCount": 0, - "suiteName": undefined, - "testCount": 4, - "tests": { - "f1": { - "errorCount": 2, - "errors": [], - "pendingCount": 0, - "testCount": 2, - "valid": false, - "warnCount": 0, - "warnings": [], - }, - "f2": SummaryBase { - "errorCount": 1, - "errors": [], - "pendingCount": 0, - "testCount": 1, - "valid": false, - "warnCount": 0, - "warnings": [], - }, - "f3": SummaryBase { - "errorCount": 0, - "errors": [], - "pendingCount": 0, - "testCount": 1, - "valid": true, - "warnCount": 0, - "warnings": [], - }, - }, - "valid": false, - "warnCount": 0, - "warnings": [], -} -`; - -exports[`unnamed groups > Should complete without adding the group to the results object 1`] = ` -SuiteSummary { - "errorCount": 3, - "errors": [ - SummaryFailure { - "fieldName": "f1", - "groupName": undefined, - "message": undefined, - }, - SummaryFailure { - "fieldName": "f2", - "groupName": undefined, - "message": undefined, - }, - SummaryFailure { - "fieldName": "f3", - "groupName": undefined, - "message": undefined, - }, - ], - "getError": [Function], - "getErrors": [Function], - "getErrorsByGroup": [Function], - "getMessage": [Function], - "getWarning": [Function], - "getWarnings": [Function], - "getWarningsByGroup": [Function], - "groups": {}, - "hasErrors": [Function], - "hasErrorsByGroup": [Function], - "hasWarnings": [Function], - "hasWarningsByGroup": [Function], - "isPending": [Function], - "isTested": [Function], - "isValid": [Function], - "isValidByGroup": [Function], - "pendingCount": 0, - "suiteName": undefined, - "testCount": 3, - "tests": { - "f1": SummaryBase { - "errorCount": 1, - "errors": [], - "pendingCount": 0, - "testCount": 1, - "valid": false, - "warnCount": 0, - "warnings": [], - }, - "f2": SummaryBase { - "errorCount": 1, - "errors": [], - "pendingCount": 0, - "testCount": 1, - "valid": false, - "warnCount": 0, - "warnings": [], - }, - "f3": SummaryBase { - "errorCount": 1, - "errors": [], - "pendingCount": 0, - "testCount": 1, - "valid": false, - "warnCount": 0, - "warnings": [], - }, - }, - "valid": false, - "warnCount": 0, - "warnings": [], -} -`; - -exports[`unnamed groups > Should run tests normally 1`] = ` -SuiteSummary { - "errorCount": 3, - "errors": [ - SummaryFailure { - "fieldName": "f1", - "groupName": undefined, - "message": undefined, - }, - SummaryFailure { - "fieldName": "f2", - "groupName": undefined, - "message": undefined, - }, - SummaryFailure { - "fieldName": "f3", - "groupName": undefined, - "message": undefined, - }, - ], - "getError": [Function], - "getErrors": [Function], - "getErrorsByGroup": [Function], - "getMessage": [Function], - "getWarning": [Function], - "getWarnings": [Function], - "getWarningsByGroup": [Function], - "groups": {}, - "hasErrors": [Function], - "hasErrorsByGroup": [Function], - "hasWarnings": [Function], - "hasWarningsByGroup": [Function], - "isPending": [Function], - "isTested": [Function], - "isValid": [Function], - "isValidByGroup": [Function], - "pendingCount": 0, - "suiteName": undefined, - "testCount": 3, - "tests": { - "f1": SummaryBase { - "errorCount": 1, - "errors": [], - "pendingCount": 0, - "testCount": 1, - "valid": false, - "warnCount": 0, - "warnings": [], - }, - "f2": SummaryBase { - "errorCount": 1, - "errors": [], - "pendingCount": 0, - "testCount": 1, - "valid": false, - "warnCount": 0, - "warnings": [], - }, - "f3": SummaryBase { - "errorCount": 1, - "errors": [], - "pendingCount": 0, - "testCount": 1, - "valid": false, - "warnCount": 0, - "warnings": [], - }, - }, - "valid": false, - "warnCount": 0, - "warnings": [], -} -`; - -exports[`unnamed groups > With skip(true) > Should skip all tests in group 1`] = ` -SuiteSummary { - "errorCount": 0, - "errors": [], - "getError": [Function], - "getErrors": [Function], - "getErrorsByGroup": [Function], - "getMessage": [Function], - "getWarning": [Function], - "getWarnings": [Function], - "getWarningsByGroup": [Function], - "groups": {}, - "hasErrors": [Function], - "hasErrorsByGroup": [Function], - "hasWarnings": [Function], - "hasWarningsByGroup": [Function], - "isPending": [Function], - "isTested": [Function], - "isValid": [Function], - "isValidByGroup": [Function], - "pendingCount": 0, - "suiteName": undefined, - "testCount": 0, - "tests": { - "f1": SummaryBase { - "errorCount": 0, - "errors": [], - "pendingCount": 0, - "testCount": 0, - "valid": false, - "warnCount": 0, - "warnings": [], - }, - "f2": SummaryBase { - "errorCount": 0, - "errors": [], - "pendingCount": 0, - "testCount": 0, - "valid": false, - "warnCount": 0, - "warnings": [], - }, - "f3": SummaryBase { - "errorCount": 0, - "errors": [], - "pendingCount": 0, - "testCount": 0, - "valid": false, - "warnCount": 0, - "warnings": [], - }, - }, - "valid": false, - "warnCount": 0, - "warnings": [], -} -`; - -exports[`unnamed groups > with only > Should only run the tests specified by only 1`] = ` -SuiteSummary { - "errorCount": 1, - "errors": [ - SummaryFailure { - "fieldName": "f1", - "groupName": undefined, - "message": undefined, - }, - ], - "getError": [Function], - "getErrors": [Function], - "getErrorsByGroup": [Function], - "getMessage": [Function], - "getWarning": [Function], - "getWarnings": [Function], - "getWarningsByGroup": [Function], - "groups": {}, - "hasErrors": [Function], - "hasErrorsByGroup": [Function], - "hasWarnings": [Function], - "hasWarningsByGroup": [Function], - "isPending": [Function], - "isTested": [Function], - "isValid": [Function], - "isValidByGroup": [Function], - "pendingCount": 0, - "suiteName": undefined, - "testCount": 1, - "tests": { - "f1": SummaryBase { - "errorCount": 1, - "errors": [], - "pendingCount": 0, - "testCount": 1, - "valid": false, - "warnCount": 0, - "warnings": [], - }, - "f2": SummaryBase { - "errorCount": 0, - "errors": [], - "pendingCount": 0, - "testCount": 0, - "valid": false, - "warnCount": 0, - "warnings": [], - }, - "f3": SummaryBase { - "errorCount": 0, - "errors": [], - "pendingCount": 0, - "testCount": 0, - "valid": false, - "warnCount": 0, - "warnings": [], - }, - }, - "valid": false, - "warnCount": 0, - "warnings": [], -} -`; - -exports[`unnamed groups > with skip > Should skip the tests specified by skip 1`] = ` -SuiteSummary { - "errorCount": 2, - "errors": [ - SummaryFailure { - "fieldName": "f2", - "groupName": undefined, - "message": undefined, - }, - SummaryFailure { - "fieldName": "f3", - "groupName": undefined, - "message": undefined, - }, - ], - "getError": [Function], - "getErrors": [Function], - "getErrorsByGroup": [Function], - "getMessage": [Function], - "getWarning": [Function], - "getWarnings": [Function], - "getWarningsByGroup": [Function], - "groups": {}, - "hasErrors": [Function], - "hasErrorsByGroup": [Function], - "hasWarnings": [Function], - "hasWarningsByGroup": [Function], - "isPending": [Function], - "isTested": [Function], - "isValid": [Function], - "isValidByGroup": [Function], - "pendingCount": 0, - "suiteName": undefined, - "testCount": 2, - "tests": { - "f1": SummaryBase { - "errorCount": 0, - "errors": [], - "pendingCount": 0, - "testCount": 0, - "valid": false, - "warnCount": 0, - "warnings": [], - }, - "f2": SummaryBase { - "errorCount": 1, - "errors": [], - "pendingCount": 0, - "testCount": 1, - "valid": false, - "warnCount": 0, - "warnings": [], - }, - "f3": SummaryBase { - "errorCount": 1, - "errors": [], - "pendingCount": 0, - "testCount": 1, - "valid": false, - "warnCount": 0, - "warnings": [], - }, - }, - "valid": false, - "warnCount": 0, - "warnings": [], -} -`; - -exports[`unnamed groups Should complete without adding the group to the results object 1`] = ` +exports[`unnamed groups > Should complete without adding the group to the results object 1`] = ` SuiteSummary { "errorCount": 3, "errors": [ @@ -2217,7 +976,7 @@ SuiteSummary { } `; -exports[`unnamed groups Should run tests normally 1`] = ` +exports[`unnamed groups > Should run tests normally 1`] = ` SuiteSummary { "errorCount": 3, "errors": [ @@ -2291,7 +1050,7 @@ SuiteSummary { } `; -exports[`unnamed groups With skip(true) Should skip all tests in group 1`] = ` +exports[`unnamed groups > With skip(true) > Should skip all tests in group 1`] = ` SuiteSummary { "errorCount": 0, "errors": [], @@ -2349,7 +1108,7 @@ SuiteSummary { } `; -exports[`unnamed groups with only Should only run the tests specified by only 1`] = ` +exports[`unnamed groups > with only > Should only run the tests specified by only 1`] = ` SuiteSummary { "errorCount": 1, "errors": [ @@ -2413,7 +1172,7 @@ SuiteSummary { } `; -exports[`unnamed groups with skip Should skip the tests specified by skip 1`] = ` +exports[`unnamed groups > with skip > Should skip the tests specified by skip 1`] = ` SuiteSummary { "errorCount": 2, "errors": [ diff --git a/packages/vest/src/isolates/__tests__/__snapshots__/omitWhen.test.ts.snap b/packages/vest/src/isolates/__tests__/__snapshots__/omitWhen.test.ts.snap index 27fdcde81..5fc45e43d 100644 --- a/packages/vest/src/isolates/__tests__/__snapshots__/omitWhen.test.ts.snap +++ b/packages/vest/src/isolates/__tests__/__snapshots__/omitWhen.test.ts.snap @@ -537,541 +537,3 @@ SuiteSummary { "warnings": [], } `; - -exports[`omitWhen When conditional is falsy boolean conditional Should have all tests within the omit block referenced in the result 1`] = ` -{ - "field_1": { - "errorCount": 1, - "errors": [], - "pendingCount": 0, - "testCount": 2, - "valid": false, - "warnCount": 0, - "warnings": [], - }, - "field_2": SummaryBase { - "errorCount": 0, - "errors": [], - "pendingCount": 0, - "testCount": 0, - "valid": false, - "warnCount": 0, - "warnings": [], - }, - "field_3": SummaryBase { - "errorCount": 0, - "errors": [], - "pendingCount": 0, - "testCount": 0, - "valid": false, - "warnCount": 0, - "warnings": [], - }, - "field_4": SummaryBase { - "errorCount": 0, - "errors": [], - "pendingCount": 0, - "testCount": 0, - "valid": false, - "warnCount": 0, - "warnings": [], - }, -} -`; - -exports[`omitWhen When conditional is falsy boolean conditional Should run tests normally 1`] = ` -{ - "field_1": { - "errorCount": 1, - "errors": [], - "pendingCount": 0, - "testCount": 2, - "valid": false, - "warnCount": 0, - "warnings": [], - }, - "field_2": SummaryBase { - "errorCount": 0, - "errors": [], - "pendingCount": 0, - "testCount": 0, - "valid": false, - "warnCount": 0, - "warnings": [], - }, - "field_3": SummaryBase { - "errorCount": 0, - "errors": [], - "pendingCount": 0, - "testCount": 0, - "valid": false, - "warnCount": 0, - "warnings": [], - }, - "field_4": SummaryBase { - "errorCount": 0, - "errors": [], - "pendingCount": 0, - "testCount": 0, - "valid": false, - "warnCount": 0, - "warnings": [], - }, -} -`; - -exports[`omitWhen When conditional is falsy boolean conditional Should run tests normally 2`] = ` -{ - "field_1": { - "errorCount": 1, - "errors": [], - "pendingCount": 0, - "testCount": 2, - "valid": false, - "warnCount": 0, - "warnings": [], - }, - "field_2": SummaryBase { - "errorCount": 0, - "errors": [], - "pendingCount": 0, - "testCount": 0, - "valid": false, - "warnCount": 0, - "warnings": [], - }, - "field_3": SummaryBase { - "errorCount": 0, - "errors": [], - "pendingCount": 0, - "testCount": 0, - "valid": false, - "warnCount": 0, - "warnings": [], - }, - "field_4": SummaryBase { - "errorCount": 0, - "errors": [], - "pendingCount": 0, - "testCount": 1, - "valid": true, - "warnCount": 0, - "warnings": [], - }, -} -`; - -exports[`omitWhen When conditional is falsy function conditional Should have all tests within the omit block referenced in the result 1`] = ` -{ - "field_1": { - "errorCount": 1, - "errors": [], - "pendingCount": 0, - "testCount": 2, - "valid": false, - "warnCount": 0, - "warnings": [], - }, - "field_2": SummaryBase { - "errorCount": 0, - "errors": [], - "pendingCount": 0, - "testCount": 0, - "valid": false, - "warnCount": 0, - "warnings": [], - }, - "field_3": SummaryBase { - "errorCount": 0, - "errors": [], - "pendingCount": 0, - "testCount": 0, - "valid": false, - "warnCount": 0, - "warnings": [], - }, - "field_4": SummaryBase { - "errorCount": 0, - "errors": [], - "pendingCount": 0, - "testCount": 0, - "valid": false, - "warnCount": 0, - "warnings": [], - }, -} -`; - -exports[`omitWhen When conditional is falsy function conditional Should run tests normally 1`] = ` -{ - "field_1": { - "errorCount": 1, - "errors": [], - "pendingCount": 0, - "testCount": 2, - "valid": false, - "warnCount": 0, - "warnings": [], - }, - "field_2": SummaryBase { - "errorCount": 0, - "errors": [], - "pendingCount": 0, - "testCount": 0, - "valid": false, - "warnCount": 0, - "warnings": [], - }, - "field_3": SummaryBase { - "errorCount": 0, - "errors": [], - "pendingCount": 0, - "testCount": 0, - "valid": false, - "warnCount": 0, - "warnings": [], - }, - "field_4": SummaryBase { - "errorCount": 0, - "errors": [], - "pendingCount": 0, - "testCount": 0, - "valid": false, - "warnCount": 0, - "warnings": [], - }, -} -`; - -exports[`omitWhen When conditional is falsy function conditional Should run tests normally 2`] = ` -{ - "field_1": { - "errorCount": 1, - "errors": [], - "pendingCount": 0, - "testCount": 2, - "valid": false, - "warnCount": 0, - "warnings": [], - }, - "field_2": SummaryBase { - "errorCount": 0, - "errors": [], - "pendingCount": 0, - "testCount": 0, - "valid": false, - "warnCount": 0, - "warnings": [], - }, - "field_3": SummaryBase { - "errorCount": 0, - "errors": [], - "pendingCount": 0, - "testCount": 0, - "valid": false, - "warnCount": 0, - "warnings": [], - }, - "field_4": SummaryBase { - "errorCount": 0, - "errors": [], - "pendingCount": 0, - "testCount": 1, - "valid": true, - "warnCount": 0, - "warnings": [], - }, -} -`; - -exports[`omitWhen When conditional is truthy boolean conditional Should avoid running the omitted tests 1`] = ` -SuiteSummary { - "errorCount": 1, - "errors": [ - SummaryFailure { - "fieldName": "field_2", - "groupName": undefined, - "message": undefined, - }, - ], - "getError": [Function], - "getErrors": [Function], - "getErrorsByGroup": [Function], - "getMessage": [Function], - "getWarning": [Function], - "getWarnings": [Function], - "getWarningsByGroup": [Function], - "groups": {}, - "hasErrors": [Function], - "hasErrorsByGroup": [Function], - "hasWarnings": [Function], - "hasWarningsByGroup": [Function], - "isPending": [Function], - "isTested": [Function], - "isValid": [Function], - "isValidByGroup": [Function], - "pendingCount": 0, - "suiteName": undefined, - "testCount": 2, - "tests": { - "field_1": { - "errorCount": 0, - "errors": [], - "pendingCount": 0, - "testCount": 1, - "valid": true, - "warnCount": 0, - "warnings": [], - }, - "field_2": SummaryBase { - "errorCount": 1, - "errors": [], - "pendingCount": 0, - "testCount": 1, - "valid": false, - "warnCount": 0, - "warnings": [], - }, - "field_3": SummaryBase { - "errorCount": 0, - "errors": [], - "pendingCount": 0, - "testCount": 0, - "valid": true, - "warnCount": 0, - "warnings": [], - }, - "field_4": SummaryBase { - "errorCount": 0, - "errors": [], - "pendingCount": 0, - "testCount": 0, - "valid": true, - "warnCount": 0, - "warnings": [], - }, - }, - "valid": false, - "warnCount": 0, - "warnings": [], -} -`; - -exports[`omitWhen When conditional is truthy boolean conditional Should skip and not run omitted fields when no filter provided 1`] = ` -SuiteSummary { - "errorCount": 1, - "errors": [ - SummaryFailure { - "fieldName": "field_2", - "groupName": undefined, - "message": undefined, - }, - ], - "getError": [Function], - "getErrors": [Function], - "getErrorsByGroup": [Function], - "getMessage": [Function], - "getWarning": [Function], - "getWarnings": [Function], - "getWarningsByGroup": [Function], - "groups": {}, - "hasErrors": [Function], - "hasErrorsByGroup": [Function], - "hasWarnings": [Function], - "hasWarningsByGroup": [Function], - "isPending": [Function], - "isTested": [Function], - "isValid": [Function], - "isValidByGroup": [Function], - "pendingCount": 0, - "suiteName": undefined, - "testCount": 2, - "tests": { - "field_1": { - "errorCount": 0, - "errors": [], - "pendingCount": 0, - "testCount": 1, - "valid": true, - "warnCount": 0, - "warnings": [], - }, - "field_2": SummaryBase { - "errorCount": 1, - "errors": [], - "pendingCount": 0, - "testCount": 1, - "valid": false, - "warnCount": 0, - "warnings": [], - }, - "field_3": SummaryBase { - "errorCount": 0, - "errors": [], - "pendingCount": 0, - "testCount": 0, - "valid": true, - "warnCount": 0, - "warnings": [], - }, - "field_4": SummaryBase { - "errorCount": 0, - "errors": [], - "pendingCount": 0, - "testCount": 0, - "valid": true, - "warnCount": 0, - "warnings": [], - }, - }, - "valid": false, - "warnCount": 0, - "warnings": [], -} -`; - -exports[`omitWhen When conditional is truthy function conditional Should avoid running the omitted tests 1`] = ` -SuiteSummary { - "errorCount": 1, - "errors": [ - SummaryFailure { - "fieldName": "field_2", - "groupName": undefined, - "message": undefined, - }, - ], - "getError": [Function], - "getErrors": [Function], - "getErrorsByGroup": [Function], - "getMessage": [Function], - "getWarning": [Function], - "getWarnings": [Function], - "getWarningsByGroup": [Function], - "groups": {}, - "hasErrors": [Function], - "hasErrorsByGroup": [Function], - "hasWarnings": [Function], - "hasWarningsByGroup": [Function], - "isPending": [Function], - "isTested": [Function], - "isValid": [Function], - "isValidByGroup": [Function], - "pendingCount": 0, - "suiteName": undefined, - "testCount": 2, - "tests": { - "field_1": { - "errorCount": 0, - "errors": [], - "pendingCount": 0, - "testCount": 1, - "valid": true, - "warnCount": 0, - "warnings": [], - }, - "field_2": SummaryBase { - "errorCount": 1, - "errors": [], - "pendingCount": 0, - "testCount": 1, - "valid": false, - "warnCount": 0, - "warnings": [], - }, - "field_3": SummaryBase { - "errorCount": 0, - "errors": [], - "pendingCount": 0, - "testCount": 0, - "valid": true, - "warnCount": 0, - "warnings": [], - }, - "field_4": SummaryBase { - "errorCount": 0, - "errors": [], - "pendingCount": 0, - "testCount": 0, - "valid": true, - "warnCount": 0, - "warnings": [], - }, - }, - "valid": false, - "warnCount": 0, - "warnings": [], -} -`; - -exports[`omitWhen When conditional is truthy function conditional Should skip and not run omitted fields when no filter provided 1`] = ` -SuiteSummary { - "errorCount": 1, - "errors": [ - SummaryFailure { - "fieldName": "field_2", - "groupName": undefined, - "message": undefined, - }, - ], - "getError": [Function], - "getErrors": [Function], - "getErrorsByGroup": [Function], - "getMessage": [Function], - "getWarning": [Function], - "getWarnings": [Function], - "getWarningsByGroup": [Function], - "groups": {}, - "hasErrors": [Function], - "hasErrorsByGroup": [Function], - "hasWarnings": [Function], - "hasWarningsByGroup": [Function], - "isPending": [Function], - "isTested": [Function], - "isValid": [Function], - "isValidByGroup": [Function], - "pendingCount": 0, - "suiteName": undefined, - "testCount": 2, - "tests": { - "field_1": { - "errorCount": 0, - "errors": [], - "pendingCount": 0, - "testCount": 1, - "valid": true, - "warnCount": 0, - "warnings": [], - }, - "field_2": SummaryBase { - "errorCount": 1, - "errors": [], - "pendingCount": 0, - "testCount": 1, - "valid": false, - "warnCount": 0, - "warnings": [], - }, - "field_3": SummaryBase { - "errorCount": 0, - "errors": [], - "pendingCount": 0, - "testCount": 0, - "valid": true, - "warnCount": 0, - "warnings": [], - }, - "field_4": SummaryBase { - "errorCount": 0, - "errors": [], - "pendingCount": 0, - "testCount": 0, - "valid": true, - "warnCount": 0, - "warnings": [], - }, - }, - "valid": false, - "warnCount": 0, - "warnings": [], -} -`; diff --git a/packages/vest/src/isolates/__tests__/__snapshots__/skipWhen.test.ts.snap b/packages/vest/src/isolates/__tests__/__snapshots__/skipWhen.test.ts.snap index 9bf98fbc4..504aabb55 100644 --- a/packages/vest/src/isolates/__tests__/__snapshots__/skipWhen.test.ts.snap +++ b/packages/vest/src/isolates/__tests__/__snapshots__/skipWhen.test.ts.snap @@ -141,145 +141,3 @@ SuiteSummary { "warnings": [], } `; - -exports[`skipWhen Should pass result draft to the functional condition 1`] = ` -SuiteSummary { - "errorCount": 0, - "errors": [], - "getError": [Function], - "getErrors": [Function], - "getErrorsByGroup": [Function], - "getMessage": [Function], - "getWarning": [Function], - "getWarnings": [Function], - "getWarningsByGroup": [Function], - "groups": {}, - "hasErrors": [Function], - "hasErrorsByGroup": [Function], - "hasWarnings": [Function], - "hasWarningsByGroup": [Function], - "isPending": [Function], - "isTested": [Function], - "isValid": [Function], - "isValidByGroup": [Function], - "pendingCount": 0, - "suiteName": undefined, - "testCount": 0, - "tests": {}, - "valid": false, - "warnCount": 0, - "warnings": [], -} -`; - -exports[`skipWhen Should pass result draft to the functional condition 2`] = ` -SuiteSummary { - "errorCount": 1, - "errors": [ - SummaryFailure { - "fieldName": "f1", - "groupName": undefined, - "message": "msg", - }, - ], - "getError": [Function], - "getErrors": [Function], - "getErrorsByGroup": [Function], - "getMessage": [Function], - "getWarning": [Function], - "getWarnings": [Function], - "getWarningsByGroup": [Function], - "groups": {}, - "hasErrors": [Function], - "hasErrorsByGroup": [Function], - "hasWarnings": [Function], - "hasWarningsByGroup": [Function], - "isPending": [Function], - "isTested": [Function], - "isValid": [Function], - "isValidByGroup": [Function], - "pendingCount": 0, - "suiteName": undefined, - "testCount": 1, - "tests": { - "f1": SummaryBase { - "errorCount": 1, - "errors": [ - "msg", - ], - "pendingCount": 0, - "testCount": 1, - "valid": false, - "warnCount": 0, - "warnings": [], - }, - }, - "valid": false, - "warnCount": 0, - "warnings": [], -} -`; - -exports[`skipWhen Should pass result draft to the functional condition 3`] = ` -SuiteSummary { - "errorCount": 2, - "errors": [ - SummaryFailure { - "fieldName": "f1", - "groupName": undefined, - "message": "msg", - }, - SummaryFailure { - "fieldName": "f2", - "groupName": undefined, - "message": "msg", - }, - ], - "getError": [Function], - "getErrors": [Function], - "getErrorsByGroup": [Function], - "getMessage": [Function], - "getWarning": [Function], - "getWarnings": [Function], - "getWarningsByGroup": [Function], - "groups": {}, - "hasErrors": [Function], - "hasErrorsByGroup": [Function], - "hasWarnings": [Function], - "hasWarningsByGroup": [Function], - "isPending": [Function], - "isTested": [Function], - "isValid": [Function], - "isValidByGroup": [Function], - "pendingCount": 0, - "suiteName": undefined, - "testCount": 2, - "tests": { - "f1": SummaryBase { - "errorCount": 1, - "errors": [ - "msg", - ], - "pendingCount": 0, - "testCount": 1, - "valid": false, - "warnCount": 0, - "warnings": [], - }, - "f2": SummaryBase { - "errorCount": 1, - "errors": [ - "msg", - ], - "pendingCount": 0, - "testCount": 1, - "valid": false, - "warnCount": 0, - "warnings": [], - }, - }, - "valid": false, - "warnCount": 0, - "warnings": [], -} -`; diff --git a/packages/vest/src/suite/__tests__/__snapshots__/create.test.ts.snap b/packages/vest/src/suite/__tests__/__snapshots__/create.test.ts.snap index 8155a15e7..b7515cb25 100644 --- a/packages/vest/src/suite/__tests__/__snapshots__/create.test.ts.snap +++ b/packages/vest/src/suite/__tests__/__snapshots__/create.test.ts.snap @@ -89,93 +89,3 @@ SuiteSummary { "warnings": [], } `; - -exports[`Test createSuite module Initial run Should be able to get the suite from the result of createSuite 1`] = ` -SuiteSummary { - "errorCount": 0, - "errors": [], - "getError": [Function], - "getErrors": [Function], - "getErrorsByGroup": [Function], - "getMessage": [Function], - "getWarning": [Function], - "getWarnings": [Function], - "getWarningsByGroup": [Function], - "groups": {}, - "hasErrors": [Function], - "hasErrorsByGroup": [Function], - "hasWarnings": [Function], - "hasWarningsByGroup": [Function], - "isPending": [Function], - "isTested": [Function], - "isValid": [Function], - "isValidByGroup": [Function], - "pendingCount": 0, - "suiteName": undefined, - "testCount": 0, - "tests": {}, - "valid": false, - "warnCount": 0, - "warnings": [], -} -`; - -exports[`Test createSuite module Initial run Should initialize with an empty result object 1`] = ` -SuiteSummary { - "errorCount": 0, - "errors": [], - "getError": [Function], - "getErrors": [Function], - "getErrorsByGroup": [Function], - "getMessage": [Function], - "getWarning": [Function], - "getWarnings": [Function], - "getWarningsByGroup": [Function], - "groups": {}, - "hasErrors": [Function], - "hasErrorsByGroup": [Function], - "hasWarnings": [Function], - "hasWarningsByGroup": [Function], - "isPending": [Function], - "isTested": [Function], - "isValid": [Function], - "isValidByGroup": [Function], - "pendingCount": 0, - "suiteName": undefined, - "testCount": 0, - "tests": {}, - "valid": false, - "warnCount": 0, - "warnings": [], -} -`; - -exports[`Test createSuite module Test suite Arguments allows omitting suite name 1`] = ` -SuiteSummary { - "errorCount": 0, - "errors": [], - "getError": [Function], - "getErrors": [Function], - "getErrorsByGroup": [Function], - "getMessage": [Function], - "getWarning": [Function], - "getWarnings": [Function], - "getWarningsByGroup": [Function], - "groups": {}, - "hasErrors": [Function], - "hasErrorsByGroup": [Function], - "hasWarnings": [Function], - "hasWarningsByGroup": [Function], - "isPending": [Function], - "isTested": [Function], - "isValid": [Function], - "isValidByGroup": [Function], - "pendingCount": 0, - "suiteName": undefined, - "testCount": 0, - "tests": {}, - "valid": false, - "warnCount": 0, - "warnings": [], -} -`; diff --git a/packages/vest/src/suite/__tests__/__snapshots__/staticSuite.test.ts.snap b/packages/vest/src/suite/__tests__/__snapshots__/staticSuite.test.ts.snap index a126e8edf..e7b2b14c1 100644 --- a/packages/vest/src/suite/__tests__/__snapshots__/staticSuite.test.ts.snap +++ b/packages/vest/src/suite/__tests__/__snapshots__/staticSuite.test.ts.snap @@ -188,192 +188,3 @@ exports[`staticSuite > dump > should output a dump of the suite 1`] = ` "status": "DONE", } `; - -exports[`staticSuite dump should output a dump of the suite 1`] = ` -{ - "$type": "Suite", - "abortController": AbortController {}, - "allowReorder": undefined, - "children": [ - { - "$type": "Test", - "abortController": AbortController {}, - "allowReorder": undefined, - "children": null, - "data": { - "fieldName": "t1", - "severity": "error", - "testFn": [Function], - }, - "key": null, - "keys": null, - "output": undefined, - "parent": [Circular], - "status": "FAILED", - }, - { - "$type": "Test", - "abortController": AbortController {}, - "allowReorder": undefined, - "children": null, - "data": { - "fieldName": "t2", - "severity": "error", - "testFn": [Function], - }, - "key": null, - "keys": null, - "output": undefined, - "parent": [Circular], - "status": "FAILED", - }, - { - "$type": "Group", - "abortController": AbortController {}, - "allowReorder": undefined, - "children": [ - { - "$type": "Test", - "abortController": AbortController {}, - "allowReorder": undefined, - "children": null, - "data": { - "fieldName": "t1", - "groupName": "g1", - "severity": "error", - "testFn": [Function], - }, - "key": null, - "keys": null, - "output": undefined, - "parent": [Circular], - "status": "SKIPPED", - }, - { - "$type": "Test", - "abortController": AbortController {}, - "allowReorder": undefined, - "children": null, - "data": { - "fieldName": "t3", - "groupName": "g1", - "severity": "error", - "testFn": [Function], - }, - "key": null, - "keys": null, - "output": undefined, - "parent": [Circular], - "status": "FAILED", - }, - ], - "data": {}, - "key": null, - "keys": null, - "output": undefined, - "parent": [Circular], - "status": "DONE", - }, - ], - "data": { - "optional": {}, - }, - "key": null, - "keys": null, - "output": { - "done": [Function], - "errorCount": 3, - "errors": [ - SummaryFailure { - "fieldName": "t1", - "groupName": undefined, - "message": undefined, - }, - SummaryFailure { - "fieldName": "t2", - "groupName": undefined, - "message": undefined, - }, - SummaryFailure { - "fieldName": "t3", - "groupName": "g1", - "message": undefined, - }, - ], - "getError": [Function], - "getErrors": [Function], - "getErrorsByGroup": [Function], - "getMessage": [Function], - "getWarning": [Function], - "getWarnings": [Function], - "getWarningsByGroup": [Function], - "groups": { - "g1": { - "t1": SummaryBase { - "errorCount": 0, - "errors": [], - "pendingCount": 0, - "testCount": 0, - "valid": false, - "warnCount": 0, - "warnings": [], - }, - "t3": SummaryBase { - "errorCount": 1, - "errors": [], - "pendingCount": 0, - "testCount": 1, - "valid": false, - "warnCount": 0, - "warnings": [], - }, - }, - }, - "hasErrors": [Function], - "hasErrorsByGroup": [Function], - "hasWarnings": [Function], - "hasWarningsByGroup": [Function], - "isPending": [Function], - "isTested": [Function], - "isValid": [Function], - "isValidByGroup": [Function], - "pendingCount": 0, - "suiteName": undefined, - "testCount": 3, - "tests": { - "t1": { - "errorCount": 1, - "errors": [], - "pendingCount": 0, - "testCount": 1, - "valid": false, - "warnCount": 0, - "warnings": [], - }, - "t2": SummaryBase { - "errorCount": 1, - "errors": [], - "pendingCount": 0, - "testCount": 1, - "valid": false, - "warnCount": 0, - "warnings": [], - }, - "t3": SummaryBase { - "errorCount": 1, - "errors": [], - "pendingCount": 0, - "testCount": 1, - "valid": false, - "warnCount": 0, - "warnings": [], - }, - }, - "valid": false, - "warnCount": 0, - "warnings": [], - }, - "parent": null, - "status": "DONE", -} -`; diff --git a/packages/vest/src/suiteResult/__tests__/__snapshots__/useProduceSuiteSummary.test.ts.snap b/packages/vest/src/suiteResult/__tests__/__snapshots__/useProduceSuiteSummary.test.ts.snap index b32f12c05..784f43cc2 100644 --- a/packages/vest/src/suiteResult/__tests__/__snapshots__/useProduceSuiteSummary.test.ts.snap +++ b/packages/vest/src/suiteResult/__tests__/__snapshots__/useProduceSuiteSummary.test.ts.snap @@ -31,37 +31,6 @@ exports[`suite() > exposed methods > Should have all exposed methods 1`] = ` } `; -exports[`suite() exposed methods Should have all exposed methods 1`] = ` -{ - "done": [Function], - "errorCount": 0, - "errors": [], - "getError": [Function], - "getErrors": [Function], - "getErrorsByGroup": [Function], - "getMessage": [Function], - "getWarning": [Function], - "getWarnings": [Function], - "getWarningsByGroup": [Function], - "groups": {}, - "hasErrors": [Function], - "hasErrorsByGroup": [Function], - "hasWarnings": [Function], - "hasWarningsByGroup": [Function], - "isPending": [Function], - "isTested": [Function], - "isValid": [Function], - "isValidByGroup": [Function], - "pendingCount": 0, - "suiteName": undefined, - "testCount": 0, - "tests": {}, - "valid": false, - "warnCount": 0, - "warnings": [], -} -`; - exports[`suite.get() > exposed methods > Should have all exposed methods 1`] = ` SuiteSummary { "errorCount": 0, @@ -91,33 +60,3 @@ SuiteSummary { "warnings": [], } `; - -exports[`suite.get() exposed methods Should have all exposed methods 1`] = ` -SuiteSummary { - "errorCount": 0, - "errors": [], - "getError": [Function], - "getErrors": [Function], - "getErrorsByGroup": [Function], - "getMessage": [Function], - "getWarning": [Function], - "getWarnings": [Function], - "getWarningsByGroup": [Function], - "groups": {}, - "hasErrors": [Function], - "hasErrorsByGroup": [Function], - "hasWarnings": [Function], - "hasWarningsByGroup": [Function], - "isPending": [Function], - "isTested": [Function], - "isValid": [Function], - "isValidByGroup": [Function], - "pendingCount": 0, - "suiteName": undefined, - "testCount": 0, - "tests": {}, - "valid": false, - "warnCount": 0, - "warnings": [], -} -`; diff --git a/packages/vest/src/suiteResult/selectors/__tests__/__snapshots__/collectFailureMessages.test.ts.snap b/packages/vest/src/suiteResult/selectors/__tests__/__snapshots__/collectFailureMessages.test.ts.snap index 50a0a30f9..f15eb6e09 100644 --- a/packages/vest/src/suiteResult/selectors/__tests__/__snapshots__/collectFailureMessages.test.ts.snap +++ b/packages/vest/src/suiteResult/selectors/__tests__/__snapshots__/collectFailureMessages.test.ts.snap @@ -87,91 +87,3 @@ exports[`collectFailureMessages > getWarningsByGroup > with field name > Should `; exports[`collectFailureMessages > getWarningsByGroup > with field name > Should match snapshot 3`] = `[]`; - -exports[`collectFailureMessages getErrors When no options passed should match snapshot 1`] = ` -{ - "field_1": [ - "field_1_failure message 2", - "field_1_failure message 3", - ], - "field_2": [ - "field_2_failure message 1", - "field_2_failure message 3", - ], -} -`; - -exports[`collectFailureMessages getErrors When specific field requested Should match snapshot 1`] = ` -[ - "field_1_failure message 2", - "field_1_failure message 3", -] -`; - -exports[`collectFailureMessages getErrors When specific field requested Should match snapshot 2`] = ` -[ - "field_2_failure message 1", - "field_2_failure message 3", -] -`; - -exports[`collectFailureMessages getErrors When specific field requested Should match snapshot 3`] = `[]`; - -exports[`collectFailureMessages getErrorsByGroup Should match snapshot 1`] = ` -{ - "field_1": [], - "field_2": [ - "field_2_failure message 1", - "field_2_failure message 3", - ], -} -`; - -exports[`collectFailureMessages getErrorsByGroup with field name Should match snapshot 1`] = `[]`; - -exports[`collectFailureMessages getErrorsByGroup with field name Should match snapshot 2`] = ` -[ - "field_2_failure message 1", - "field_2_failure message 3", -] -`; - -exports[`collectFailureMessages getErrorsByGroup with field name Should match snapshot 3`] = `[]`; - -exports[`collectFailureMessages getWarnings When no options passed should match snapshot 1`] = ` -{ - "field_2": [ - "field_2_warning message 3", - "field_2_warning message 2", - ], -} -`; - -exports[`collectFailureMessages getWarnings When specific field requested Should match snapshot 1`] = `[]`; - -exports[`collectFailureMessages getWarnings When specific field requested Should match snapshot 2`] = ` -[ - "field_2_warning message 3", - "field_2_warning message 2", -] -`; - -exports[`collectFailureMessages getWarnings When specific field requested Should match snapshot 3`] = `[]`; - -exports[`collectFailureMessages getWarningsByGroup Should match snapshot 1`] = ` -{ - "field_2": [ - "field_2_warning message 3", - ], -} -`; - -exports[`collectFailureMessages getWarningsByGroup with field name Should match snapshot 1`] = `[]`; - -exports[`collectFailureMessages getWarningsByGroup with field name Should match snapshot 2`] = ` -[ - "field_2_warning message 3", -] -`; - -exports[`collectFailureMessages getWarningsByGroup with field name Should match snapshot 3`] = `[]`; diff --git a/packages/vestjs-runtime/src/Isolate/__tests__/__snapshots__/asyncIsolate.test.ts.snap b/packages/vestjs-runtime/src/Isolate/__tests__/__snapshots__/asyncIsolate.test.ts.snap index e6dbc963c..106400687 100644 --- a/packages/vestjs-runtime/src/Isolate/__tests__/__snapshots__/asyncIsolate.test.ts.snap +++ b/packages/vestjs-runtime/src/Isolate/__tests__/__snapshots__/asyncIsolate.test.ts.snap @@ -59,63 +59,3 @@ exports[`AsyncIsolate > It should resolve async isolate into the parent 2`] = ` "parent": null, } `; - -exports[`AsyncIsolate It should resolve async isolate into the parent 2`] = ` -{ - "$type": "URoot", - "abortController": AbortController {}, - "allowReorder": undefined, - "children": [ - { - "$type": "UChild_1", - "abortController": AbortController {}, - "allowReorder": undefined, - "children": [ - { - "$type": "UGrandChild_1", - "abortController": AbortController {}, - "allowReorder": undefined, - "children": null, - "data": {}, - "key": null, - "keys": null, - "output": undefined, - "parent": [Circular], - }, - { - "$type": "UGrandChild_2", - "abortController": AbortController {}, - "allowReorder": undefined, - "children": null, - "data": {}, - "key": null, - "keys": null, - "output": undefined, - "parent": [Circular], - }, - { - "$type": "UGrandChild_3", - "abortController": AbortController {}, - "allowReorder": undefined, - "children": null, - "data": {}, - "key": null, - "keys": null, - "output": undefined, - "parent": [Circular], - }, - ], - "data": {}, - "key": null, - "keys": null, - "output": undefined, - "parent": [Circular], - }, - ], - "data": {}, - "key": null, - "keys": null, - "output": Promise {}, - "parent": null, -} -`; diff --git a/packages/vestjs-runtime/src/exports/__tests__/__snapshots__/IsolateSerializer.test.ts.snap b/packages/vestjs-runtime/src/exports/__tests__/__snapshots__/IsolateSerializer.test.ts.snap index 132258ac7..215cf659c 100644 --- a/packages/vestjs-runtime/src/exports/__tests__/__snapshots__/IsolateSerializer.test.ts.snap +++ b/packages/vestjs-runtime/src/exports/__tests__/__snapshots__/IsolateSerializer.test.ts.snap @@ -3,7 +3,3 @@ exports[`IsolateSerializer > Custom Data Serialization > Should serialize data with custom keys 1`] = `"[{"0":"URoot","1":{"2":"3"},"children":[{"0":"UChild_1","1":{"2":"3"}},{"0":"UChild_2"},{"0":"UChild_3"}]},{"0":"$type","1":"data","2":"some_data","3":true}]"`; exports[`IsolateSerializer > serialize > Should produce serialized dump 1`] = `"[{"0":"URoot","1":{"2":"3"},"children":[{"0":"UChild_1","1":{"2":"3"}},{"0":"UChild_2"},{"0":"UChild_3"}]},{"0":"$type","1":"data","2":"some_data","3":true}]"`; - -exports[`IsolateSerializer Custom Data Serialization Should serialize data with custom keys 1`] = `"[{"0":"URoot","1":{"2":"3"},"children":[{"0":"UChild_1","1":{"2":"3"}},{"0":"UChild_2"},{"0":"UChild_3"}]},{"0":"$type","1":"data","2":"some_data","3":true}]"`; - -exports[`IsolateSerializer serialize Should produce serialized dump 1`] = `"[{"0":"URoot","1":{"2":"3"},"children":[{"0":"UChild_1","1":{"2":"3"}},{"0":"UChild_2"},{"0":"UChild_3"}]},{"0":"$type","1":"data","2":"some_data","3":true}]"`; diff --git a/vitest.config.ts b/vitest.config.ts index 4ad47d879..736555f2b 100644 --- a/vitest.config.ts +++ b/vitest.config.ts @@ -11,15 +11,7 @@ export default defineConfig({ plugins: [ tsconfigPaths({ loose: true, - projects: [ - 'packages/vest-utils', - 'packages/context', - 'packages/vestjs-runtime', - 'packages/vast', - 'packages/n4s', - 'packages/vest', - 'packages/anyone', - ], + projects: ["packages/vest-utils","packages/context","packages/vestjs-runtime","packages/vast","packages/n4s","packages/vest","packages/anyone"], }), ], });