diff --git a/.eslintrc.js b/.eslintrc.js index 5e966ce44..c786e5384 100644 --- a/.eslintrc.js +++ b/.eslintrc.js @@ -1,13 +1,12 @@ +const vitest = require('eslint-plugin-vitest'); + module.exports = { env: { es6: true, - jest: true, node: true, }, extends: [ 'eslint:recommended', - 'plugin:jest/recommended', - 'plugin:jest/style', 'plugin:import/errors', 'plugin:import/warnings', 'prettier', @@ -16,6 +15,11 @@ module.exports = { __DEV__: true, __LIB_VERSION__: true, ENV_DEVELOPMENT: true, + afterEach: true, + beforeEach: true, + describe: true, + expect: true, + vi: true, }, ignorePatterns: ['*.d.ts', '/website/'], overrides: [ @@ -58,9 +62,6 @@ module.exports = { { excludedFiles: ['./**/__tests__/**/*.*'], files: ['*.ts'], - rules: { - 'jest/no-export': 0, - }, }, { files: ['./**/vest/src/**/*.*'], @@ -69,9 +70,21 @@ module.exports = { 'vest-internal/use-use': 2, }, }, + { + files: ['./**/__tests__/**/*.*'], + rules: { + ...vitest.configs.recommended.rules, + 'vitest/expect-expect': [ + 'error', + { + assertFunctionNames: ['expect', 'assert', 'enforce'], + }, + ], + }, + }, ], parser: '@typescript-eslint/parser', - plugins: ['jest', 'vest-internal'], + plugins: ['vitest', 'vest-internal'], rules: { complexity: [2, { max: 5 }], 'import/extensions': [0, 'ignorePackages'], @@ -100,9 +113,9 @@ module.exports = { ], }, ], - 'jest/expect-expect': 0, - 'jest/no-identical-title': 0, - 'jest/no-standalone-expect': 0, + 'vitest/expect-expect': 0, + 'vitest/no-identical-title': 0, + 'vitest/no-standalone-expect': 0, 'max-params': [1, { max: 4 }], 'no-console': 2, 'no-else-return': 1, diff --git a/CONTRIBUTING.md b/CONTRIBUTING.md index ab8647fc9..ea942326e 100644 --- a/CONTRIBUTING.md +++ b/CONTRIBUTING.md @@ -19,7 +19,7 @@ The structure of the repo is as follows ├── vx # Repo setup and CI config │   ├── commands # All the supported cli commands │   ├── config -│   │   ├── jest +│   │   ├── vitest │   │   └── rollup │   │   ├── plugins │   ├── scripts # All the scripts used to build and release the packages @@ -57,13 +57,13 @@ The naming convention for a test file is `moduleName.test.ts`. #### Running tests -To run tests, you need to run `vx test`. This will run all tests in all packages. The tests are being run by jest. +To run tests, you need to run `vx test`. This will run all tests in all packages. The tests are being run by vitest. You can narrow it down by specifying the package name: `vx test vest` -Normal jest options can be passed to the test command. +Normal vitest options can be passed to the test command. `vx test --watch` diff --git a/package.json b/package.json index 73f05e9b3..acb8079a5 100644 --- a/package.json +++ b/package.json @@ -24,7 +24,6 @@ ], "devDependencies": { "@faker-js/faker": "^8.4.1", - "@types/jest": "^29.5.12", "@types/lodash": "^4.17.5", "@typescript-eslint/eslint-plugin": "^6.21.0", "@typescript-eslint/parser": "^6.21.0", @@ -32,7 +31,6 @@ "eslint-config-prettier": "^9.1.0", "eslint-import-resolver-typescript": "^3.6.1", "eslint-plugin-import": "^2.29.1", - "eslint-plugin-jest": "^27.9.0", "husky": "^8.0.3", "lodash": "^4.17.21", "prettier": "^3.3.1", diff --git a/packages/anyone/src/__tests__/all.test.ts b/packages/anyone/src/__tests__/all.test.ts index 9ada00386..b89981a09 100644 --- a/packages/anyone/src/__tests__/all.test.ts +++ b/packages/anyone/src/__tests__/all.test.ts @@ -1,4 +1,5 @@ import { sample, random } from 'lodash'; +import { describe, it, expect } from 'vitest'; import { TRUTHY_VALUES, FALSY_VALUES } from './anyoneTestValues'; diff --git a/packages/anyone/src/__tests__/any.test.ts b/packages/anyone/src/__tests__/any.test.ts index 517766104..590e86e96 100644 --- a/packages/anyone/src/__tests__/any.test.ts +++ b/packages/anyone/src/__tests__/any.test.ts @@ -1,4 +1,5 @@ import { sample, random } from 'lodash'; +import { describe, it, expect } from 'vitest'; import { TRUTHY_VALUES, FALSY_VALUES } from './anyoneTestValues'; diff --git a/packages/anyone/src/__tests__/none.test.ts b/packages/anyone/src/__tests__/none.test.ts index 8140bbdb7..3ffd88288 100644 --- a/packages/anyone/src/__tests__/none.test.ts +++ b/packages/anyone/src/__tests__/none.test.ts @@ -1,4 +1,5 @@ import { sample, random } from 'lodash'; +import { describe, it, expect } from 'vitest'; import { TRUTHY_VALUES, FALSY_VALUES } from './anyoneTestValues'; diff --git a/packages/anyone/src/__tests__/one.test.ts b/packages/anyone/src/__tests__/one.test.ts index 245701668..f5a1c5216 100644 --- a/packages/anyone/src/__tests__/one.test.ts +++ b/packages/anyone/src/__tests__/one.test.ts @@ -1,4 +1,5 @@ import { sample, random } from 'lodash'; +import { describe, it, expect } from 'vitest'; import { TRUTHY_VALUES, FALSY_VALUES } from './anyoneTestValues'; diff --git a/packages/anyone/src/__tests__/runAnyoneMethods.test.ts b/packages/anyone/src/__tests__/runAnyoneMethods.test.ts index bd10b458d..259860de9 100644 --- a/packages/anyone/src/__tests__/runAnyoneMethods.test.ts +++ b/packages/anyone/src/__tests__/runAnyoneMethods.test.ts @@ -1,3 +1,5 @@ +import { describe, it, expect } from 'vitest'; + import { FALSY_VALUES, TRUTHY_VALUES } from './anyoneTestValues'; import run from 'runAnyoneMethods'; diff --git a/packages/context/src/__tests__/__snapshots__/cascade.test.ts.snap b/packages/context/src/__tests__/__snapshots__/cascade.test.ts.snap index e8e84c468..2116e67f9 100644 --- a/packages/context/src/__tests__/__snapshots__/cascade.test.ts.snap +++ b/packages/context/src/__tests__/__snapshots__/cascade.test.ts.snap @@ -1,19 +1,19 @@ -// Jest Snapshot v1, https://goo.gl/fbAQLP +// Vitest Snapshot v1, https://vitest.dev/guide/snapshot.html -exports[`Cascading Context context.run Should clear context after callback run 1`] = ` +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`] = ` +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`] = ` +exports[`Cascading Context > createCascade > Should return all methods 1`] = ` { "bind": [Function], "run": [Function], diff --git a/packages/context/src/__tests__/cascade.test.ts b/packages/context/src/__tests__/cascade.test.ts index 663f83253..376cf5511 100644 --- a/packages/context/src/__tests__/cascade.test.ts +++ b/packages/context/src/__tests__/cascade.test.ts @@ -1,3 +1,5 @@ +import { describe, it, expect, beforeEach, vi } from 'vitest'; + import { createCascade, CtxCascadeApi } from 'context'; describe('Cascading Context', () => { @@ -141,7 +143,7 @@ describe('Cascading Context', () => { describe('context.bind', () => { it('Returns a function', () => { - expect(typeof ctx.bind({}, jest.fn())).toBe('function'); + expect(typeof ctx.bind({}, vi.fn())).toBe('function'); }); it('Wraps the function with context', () => { @@ -160,7 +162,7 @@ describe('Cascading Context', () => { }); it('Passes runtime arguments to bound function', () => { - const fn = jest.fn(); + const fn = vi.fn(); const args = Array.from({ length: 100 }, (_, i) => `${i}`); // 1-100 ctx.bind({}, fn)(...args); @@ -269,7 +271,7 @@ describe('Cascading Context', () => { describe('init argument', () => { it('Should run init function on every context.run', () => { - const init = jest.fn(); + const init = vi.fn(); const ctx = createCascade(init); @@ -293,7 +295,7 @@ describe('Cascading Context', () => { }); it('Should accept ctxRef as first argument', () => { - const init = jest.fn(); + const init = vi.fn(); const ctx = createCascade(init); const ref1 = { a: 1, b: 2 }; @@ -307,7 +309,7 @@ describe('Cascading Context', () => { }); it('Should accept parentContext as second argument', () => { - const init = jest.fn(); + const init = vi.fn(); const ctx = createCascade(init); let p1; diff --git a/packages/context/src/__tests__/context.test.ts b/packages/context/src/__tests__/context.test.ts index b0bb0d957..52b428711 100644 --- a/packages/context/src/__tests__/context.test.ts +++ b/packages/context/src/__tests__/context.test.ts @@ -1,3 +1,5 @@ +import { describe, it, expect, beforeEach } from 'vitest'; + import { createContext, CtxApi } from 'context'; describe('Context', () => { diff --git a/packages/n4s/src/__tests__/enforce.test.ts b/packages/n4s/src/__tests__/enforce.test.ts index 16aaefb0e..c4941e299 100644 --- a/packages/n4s/src/__tests__/enforce.test.ts +++ b/packages/n4s/src/__tests__/enforce.test.ts @@ -1,21 +1,10 @@ -import { TEnforceMock } from '../../testUtils/TEnforceMock'; +import { describe, it, expect, beforeEach } from 'vitest'; -import * as ruleReturn from 'ruleReturn'; +import { enforce } from 'enforce'; -const _proxy = global.Proxy; -let enforce: TEnforceMock; +import * as ruleReturn from 'ruleReturn'; describe(`enforce`, () => { - beforeEach(() => { - jest.resetModules(); - enforce = require('enforce').enforce as TEnforceMock; - }); - - afterEach(() => { - jest.resetModules(); - global.Proxy = _proxy; - }); - describe('eager assertions', () => { it('Should throw an error when invalid', () => { expect(() => enforce('4').isNumber()).toThrow(); diff --git a/packages/n4s/src/__tests__/enforceEager.test.ts b/packages/n4s/src/__tests__/enforceEager.test.ts index dcbb3feb6..9f0970f3d 100644 --- a/packages/n4s/src/__tests__/enforceEager.test.ts +++ b/packages/n4s/src/__tests__/enforceEager.test.ts @@ -1,3 +1,5 @@ +import { describe, it, expect, afterEach } from 'vitest'; + import enforceEager from 'enforceEager'; describe(`enforce eager`, () => { diff --git a/packages/n4s/src/exports/__tests__/compose.test.ts b/packages/n4s/src/exports/__tests__/compose.test.ts index c949b5973..8d4cc25dd 100644 --- a/packages/n4s/src/exports/__tests__/compose.test.ts +++ b/packages/n4s/src/exports/__tests__/compose.test.ts @@ -1,3 +1,5 @@ +import { describe, it, expect } from 'vitest'; + import compose from 'compose'; import { enforce } from 'n4s'; import * as ruleReturn from 'ruleReturn'; diff --git a/packages/n4s/src/exports/__tests__/date.test.ts b/packages/n4s/src/exports/__tests__/date.test.ts index 5e221a30a..fe0f637d3 100644 --- a/packages/n4s/src/exports/__tests__/date.test.ts +++ b/packages/n4s/src/exports/__tests__/date.test.ts @@ -1,3 +1,5 @@ +import { describe, it, expect } from 'vitest'; + import { enforce } from 'n4s'; import 'date'; diff --git a/packages/n4s/src/exports/__tests__/email.test.ts b/packages/n4s/src/exports/__tests__/email.test.ts index 370e7fbec..15426381e 100644 --- a/packages/n4s/src/exports/__tests__/email.test.ts +++ b/packages/n4s/src/exports/__tests__/email.test.ts @@ -1,3 +1,5 @@ +import { describe, it, expect } from 'vitest'; + import { enforce } from 'n4s'; import 'email'; diff --git a/packages/n4s/src/exports/__tests__/isUrl.test.ts b/packages/n4s/src/exports/__tests__/isUrl.test.ts index 837d14269..e48ef328e 100644 --- a/packages/n4s/src/exports/__tests__/isUrl.test.ts +++ b/packages/n4s/src/exports/__tests__/isUrl.test.ts @@ -1,3 +1,5 @@ +import { describe, it, expect } from 'vitest'; + import { enforce } from 'n4s'; import 'isURL'; diff --git a/packages/n4s/src/plugins/compounds/__tests__/allOf.test.ts b/packages/n4s/src/plugins/compounds/__tests__/allOf.test.ts index a7e29fc22..824135d1c 100644 --- a/packages/n4s/src/plugins/compounds/__tests__/allOf.test.ts +++ b/packages/n4s/src/plugins/compounds/__tests__/allOf.test.ts @@ -1,3 +1,5 @@ +import { describe, it, expect } from 'vitest'; + import { enforce } from 'enforce'; import * as ruleReturn from 'ruleReturn'; import 'compounds'; diff --git a/packages/n4s/src/plugins/compounds/__tests__/noneOf.test.ts b/packages/n4s/src/plugins/compounds/__tests__/noneOf.test.ts index 26774029f..cba74ae6f 100644 --- a/packages/n4s/src/plugins/compounds/__tests__/noneOf.test.ts +++ b/packages/n4s/src/plugins/compounds/__tests__/noneOf.test.ts @@ -1,3 +1,5 @@ +import { describe, it, expect } from 'vitest'; + import { enforce } from 'enforce'; import * as ruleReturn from 'ruleReturn'; import 'compounds'; diff --git a/packages/n4s/src/plugins/compounds/__tests__/oneOf.test.ts b/packages/n4s/src/plugins/compounds/__tests__/oneOf.test.ts index 084f1f3d3..47793f978 100644 --- a/packages/n4s/src/plugins/compounds/__tests__/oneOf.test.ts +++ b/packages/n4s/src/plugins/compounds/__tests__/oneOf.test.ts @@ -1,3 +1,5 @@ +import { describe, it, expect } from 'vitest'; + import { enforce } from 'enforce'; import * as ruleReturn from 'ruleReturn'; diff --git a/packages/n4s/src/plugins/schema/__tests__/isArrayOf.test.ts b/packages/n4s/src/plugins/schema/__tests__/isArrayOf.test.ts index bbcade4c1..badeea74e 100644 --- a/packages/n4s/src/plugins/schema/__tests__/isArrayOf.test.ts +++ b/packages/n4s/src/plugins/schema/__tests__/isArrayOf.test.ts @@ -1,3 +1,5 @@ +import { describe, it, expect } from 'vitest'; + import { enforce } from 'enforce'; import 'schema'; import 'compounds'; diff --git a/packages/n4s/src/plugins/schema/__tests__/loose.test.ts b/packages/n4s/src/plugins/schema/__tests__/loose.test.ts index e94188e39..0eb2085d0 100644 --- a/packages/n4s/src/plugins/schema/__tests__/loose.test.ts +++ b/packages/n4s/src/plugins/schema/__tests__/loose.test.ts @@ -1,3 +1,5 @@ +import { describe, it, expect } from 'vitest'; + import { enforce } from 'enforce'; import * as ruleReturn from 'ruleReturn'; import 'schema'; diff --git a/packages/n4s/src/plugins/schema/__tests__/optional.test.ts b/packages/n4s/src/plugins/schema/__tests__/optional.test.ts index fd6f22faf..e4cf15430 100644 --- a/packages/n4s/src/plugins/schema/__tests__/optional.test.ts +++ b/packages/n4s/src/plugins/schema/__tests__/optional.test.ts @@ -1,3 +1,5 @@ +import { describe, it, expect } from 'vitest'; + import { enforce } from 'enforce'; import * as ruleReturn from 'ruleReturn'; import 'schema'; diff --git a/packages/n4s/src/plugins/schema/__tests__/partial.test.ts b/packages/n4s/src/plugins/schema/__tests__/partial.test.ts index ae261ff81..106afcfea 100644 --- a/packages/n4s/src/plugins/schema/__tests__/partial.test.ts +++ b/packages/n4s/src/plugins/schema/__tests__/partial.test.ts @@ -1,3 +1,5 @@ +import { describe, it, expect } from 'vitest'; + import { enforce } from 'enforce'; import * as ruleReturn from 'ruleReturn'; import { partial } from 'schema'; diff --git a/packages/n4s/src/plugins/schema/__tests__/shape&loose.test.ts b/packages/n4s/src/plugins/schema/__tests__/shape&loose.test.ts index caff29e3e..eb47d1501 100644 --- a/packages/n4s/src/plugins/schema/__tests__/shape&loose.test.ts +++ b/packages/n4s/src/plugins/schema/__tests__/shape&loose.test.ts @@ -1,3 +1,5 @@ +import { describe, it, expect } from 'vitest'; + import { enforce } from 'enforce'; import * as ruleReturn from 'ruleReturn'; import 'schema'; diff --git a/packages/n4s/src/plugins/schema/__tests__/shape.test.ts b/packages/n4s/src/plugins/schema/__tests__/shape.test.ts index a81ad0292..3407a6452 100644 --- a/packages/n4s/src/plugins/schema/__tests__/shape.test.ts +++ b/packages/n4s/src/plugins/schema/__tests__/shape.test.ts @@ -1,3 +1,5 @@ +import { describe, it, expect } from 'vitest'; + import { enforce } from 'enforce'; import * as ruleReturn from 'ruleReturn'; import 'schema'; diff --git a/packages/n4s/src/rules/__tests__/endsWith.test.ts b/packages/n4s/src/rules/__tests__/endsWith.test.ts index b23c1df25..bc854f861 100644 --- a/packages/n4s/src/rules/__tests__/endsWith.test.ts +++ b/packages/n4s/src/rules/__tests__/endsWith.test.ts @@ -1,3 +1,5 @@ +import { describe, it, expect } from 'vitest'; + import { endsWith } from 'endsWith'; describe('Tests isArray rule', () => { diff --git a/packages/n4s/src/rules/__tests__/equals.test.ts b/packages/n4s/src/rules/__tests__/equals.test.ts index 95966f4d5..fd7d1ef9e 100644 --- a/packages/n4s/src/rules/__tests__/equals.test.ts +++ b/packages/n4s/src/rules/__tests__/equals.test.ts @@ -1,5 +1,6 @@ import { faker } from '@faker-js/faker'; import { sample } from 'lodash'; +import { describe, it, expect } from 'vitest'; import { equals } from 'equals'; diff --git a/packages/n4s/src/rules/__tests__/greaterThanOrEquals.test.ts b/packages/n4s/src/rules/__tests__/greaterThanOrEquals.test.ts index 96a86c757..cfcb7ca47 100644 --- a/packages/n4s/src/rules/__tests__/greaterThanOrEquals.test.ts +++ b/packages/n4s/src/rules/__tests__/greaterThanOrEquals.test.ts @@ -1,4 +1,5 @@ import { faker } from '@faker-js/faker'; +import { describe, it, expect, beforeEach } from 'vitest'; import { greaterThanOrEquals } from 'greaterThanOrEquals'; diff --git a/packages/n4s/src/rules/__tests__/inside.test.ts b/packages/n4s/src/rules/__tests__/inside.test.ts index d3d19ca22..4ae425092 100644 --- a/packages/n4s/src/rules/__tests__/inside.test.ts +++ b/packages/n4s/src/rules/__tests__/inside.test.ts @@ -1,3 +1,5 @@ +import { describe, it, expect } from 'vitest'; + import { inside } from 'inside'; describe('Inside rule', () => { diff --git a/packages/n4s/src/rules/__tests__/isBetween.test.ts b/packages/n4s/src/rules/__tests__/isBetween.test.ts index 45f56838d..4a2cc3598 100644 --- a/packages/n4s/src/rules/__tests__/isBetween.test.ts +++ b/packages/n4s/src/rules/__tests__/isBetween.test.ts @@ -1,3 +1,5 @@ +import { describe, it, expect } from 'vitest'; + import { isBetween } from 'isBetween'; describe('Tests isBetween rule', () => { diff --git a/packages/n4s/src/rules/__tests__/isBlank.test.ts b/packages/n4s/src/rules/__tests__/isBlank.test.ts index fd166d4a5..11ea85a18 100644 --- a/packages/n4s/src/rules/__tests__/isBlank.test.ts +++ b/packages/n4s/src/rules/__tests__/isBlank.test.ts @@ -1,3 +1,5 @@ +import { describe, it, expect } from 'vitest'; + import { isBlank, isNotBlank } from 'isBlank'; describe('isBlank', () => { diff --git a/packages/n4s/src/rules/__tests__/isBoolean.test.ts b/packages/n4s/src/rules/__tests__/isBoolean.test.ts index 565da2793..8e32b7520 100644 --- a/packages/n4s/src/rules/__tests__/isBoolean.test.ts +++ b/packages/n4s/src/rules/__tests__/isBoolean.test.ts @@ -1,3 +1,5 @@ +import { describe, it, expect } from 'vitest'; + import { enforce } from 'enforce'; describe('isBoolean', () => { diff --git a/packages/n4s/src/rules/__tests__/isEven.test.ts b/packages/n4s/src/rules/__tests__/isEven.test.ts index c96438f06..bc30d0efb 100644 --- a/packages/n4s/src/rules/__tests__/isEven.test.ts +++ b/packages/n4s/src/rules/__tests__/isEven.test.ts @@ -1,4 +1,5 @@ import { faker } from '@faker-js/faker'; +import { describe, it, expect, beforeAll } from 'vitest'; import { isEven } from 'isEven'; diff --git a/packages/n4s/src/rules/__tests__/isKeyOf.test.ts b/packages/n4s/src/rules/__tests__/isKeyOf.test.ts index fd9b3a2fc..febf89bd9 100644 --- a/packages/n4s/src/rules/__tests__/isKeyOf.test.ts +++ b/packages/n4s/src/rules/__tests__/isKeyOf.test.ts @@ -1,3 +1,5 @@ +import { describe, it, expect } from 'vitest'; + import { enforce } from 'enforce'; import { isKeyOf, isNotKeyOf } from 'isKeyOf'; diff --git a/packages/n4s/src/rules/__tests__/isNaN.test.ts b/packages/n4s/src/rules/__tests__/isNaN.test.ts index 4b384c4da..248fa85fd 100644 --- a/packages/n4s/src/rules/__tests__/isNaN.test.ts +++ b/packages/n4s/src/rules/__tests__/isNaN.test.ts @@ -1,3 +1,5 @@ +import { describe, it, expect } from 'vitest'; + import * as NaNRule from 'isNaN'; describe('Tests isNaN rule', () => { diff --git a/packages/n4s/src/rules/__tests__/isNegative.test.ts b/packages/n4s/src/rules/__tests__/isNegative.test.ts index 192cbd5e5..b8502b634 100644 --- a/packages/n4s/src/rules/__tests__/isNegative.test.ts +++ b/packages/n4s/src/rules/__tests__/isNegative.test.ts @@ -1,3 +1,5 @@ +import { describe, it, expect } from 'vitest'; + import { isNegative } from 'isNegative'; describe('Tests isNegative rule', () => { diff --git a/packages/n4s/src/rules/__tests__/isNullish.test.ts b/packages/n4s/src/rules/__tests__/isNullish.test.ts index 56f8e0b2b..3d0117cc4 100644 --- a/packages/n4s/src/rules/__tests__/isNullish.test.ts +++ b/packages/n4s/src/rules/__tests__/isNullish.test.ts @@ -1,3 +1,5 @@ +import { describe, it, expect } from 'vitest'; + import { enforce } from 'n4s'; describe('enforce.isNullish', () => { diff --git a/packages/n4s/src/rules/__tests__/isNumber.test.ts b/packages/n4s/src/rules/__tests__/isNumber.test.ts index e9dd869db..da3d626e0 100644 --- a/packages/n4s/src/rules/__tests__/isNumber.test.ts +++ b/packages/n4s/src/rules/__tests__/isNumber.test.ts @@ -1,3 +1,5 @@ +import { describe, it, expect } from 'vitest'; + import { isNumber } from 'isNumber'; describe('Tests isNumber rule', () => { diff --git a/packages/n4s/src/rules/__tests__/isOdd.test.ts b/packages/n4s/src/rules/__tests__/isOdd.test.ts index a4cf24efb..a80a57a8c 100644 --- a/packages/n4s/src/rules/__tests__/isOdd.test.ts +++ b/packages/n4s/src/rules/__tests__/isOdd.test.ts @@ -1,4 +1,5 @@ import { faker } from '@faker-js/faker'; +import { describe, it, expect } from 'vitest'; import { isOdd } from 'isOdd'; diff --git a/packages/n4s/src/rules/__tests__/isTruthy.test.ts b/packages/n4s/src/rules/__tests__/isTruthy.test.ts index 41c6d478a..91ebdc5f1 100644 --- a/packages/n4s/src/rules/__tests__/isTruthy.test.ts +++ b/packages/n4s/src/rules/__tests__/isTruthy.test.ts @@ -1,3 +1,5 @@ +import { describe, it, expect } from 'vitest'; + import { isTruthy } from 'isTruthy'; describe('Tests isTruthy rule', () => { diff --git a/packages/n4s/src/rules/__tests__/isValueOf.test.ts b/packages/n4s/src/rules/__tests__/isValueOf.test.ts index 57515b63e..c9d71b9bb 100644 --- a/packages/n4s/src/rules/__tests__/isValueOf.test.ts +++ b/packages/n4s/src/rules/__tests__/isValueOf.test.ts @@ -1,3 +1,5 @@ +import { describe, it, expect } from 'vitest'; + import { enforce } from 'enforce'; import { isValueOf, isNotValueOf } from 'isValueOf'; diff --git a/packages/n4s/src/rules/__tests__/lessThan.test.ts b/packages/n4s/src/rules/__tests__/lessThan.test.ts index 9360d3c49..eb7a4e099 100644 --- a/packages/n4s/src/rules/__tests__/lessThan.test.ts +++ b/packages/n4s/src/rules/__tests__/lessThan.test.ts @@ -1,4 +1,5 @@ import { faker } from '@faker-js/faker'; +import { describe, it, expect, beforeEach } from 'vitest'; import { lessThan } from 'lessThan'; diff --git a/packages/n4s/src/rules/__tests__/lessThanOrEquals.test.ts b/packages/n4s/src/rules/__tests__/lessThanOrEquals.test.ts index aaf16e883..ec01f8c6f 100644 --- a/packages/n4s/src/rules/__tests__/lessThanOrEquals.test.ts +++ b/packages/n4s/src/rules/__tests__/lessThanOrEquals.test.ts @@ -1,4 +1,5 @@ import { faker } from '@faker-js/faker'; +import { describe, it, expect, beforeEach } from 'vitest'; import { lessThanOrEquals } from 'lessThanOrEquals'; diff --git a/packages/n4s/src/rules/__tests__/longerThanOrEquals.test.ts b/packages/n4s/src/rules/__tests__/longerThanOrEquals.test.ts index 132297d37..d8d9699e2 100644 --- a/packages/n4s/src/rules/__tests__/longerThanOrEquals.test.ts +++ b/packages/n4s/src/rules/__tests__/longerThanOrEquals.test.ts @@ -1,4 +1,5 @@ import { faker } from '@faker-js/faker'; +import { describe, it, expect } from 'vitest'; import { longerThanOrEquals } from 'longerThanOrEquals'; diff --git a/packages/n4s/src/rules/__tests__/matches.test.ts b/packages/n4s/src/rules/__tests__/matches.test.ts index 48464e318..48a495c69 100644 --- a/packages/n4s/src/rules/__tests__/matches.test.ts +++ b/packages/n4s/src/rules/__tests__/matches.test.ts @@ -1,3 +1,5 @@ +import { describe, it, expect } from 'vitest'; + import { matches } from 'matches'; const URL = diff --git a/packages/n4s/src/rules/__tests__/ruleCondition.test.ts b/packages/n4s/src/rules/__tests__/ruleCondition.test.ts index 1b7e0a91e..3e880e5ea 100644 --- a/packages/n4s/src/rules/__tests__/ruleCondition.test.ts +++ b/packages/n4s/src/rules/__tests__/ruleCondition.test.ts @@ -1,9 +1,11 @@ +import { describe, it, expect, vi } from 'vitest'; + import { enforce } from 'n4s'; import ruleReturn, { failing, passing } from 'ruleReturn'; describe('enforce.condition', () => { it('Should pass down enforced value to condition as the first argument', () => { - const condition = jest.fn(() => true); + const condition = vi.fn(() => true); enforce(1).condition(condition); expect(condition).toHaveBeenCalledWith(1); diff --git a/packages/n4s/src/rules/__tests__/rules.test.ts b/packages/n4s/src/rules/__tests__/rules.test.ts index e2cdab9a7..58c8bc46d 100644 --- a/packages/n4s/src/rules/__tests__/rules.test.ts +++ b/packages/n4s/src/rules/__tests__/rules.test.ts @@ -1,4 +1,5 @@ import rules from 'rules'; +import { describe, it, expect } from 'vitest'; describe('Tests enforce rules API', () => { it('Should expose all enforce rules', () => { diff --git a/packages/n4s/src/rules/__tests__/shorterThan.test.ts b/packages/n4s/src/rules/__tests__/shorterThan.test.ts index 59e9faff8..d4a76e934 100644 --- a/packages/n4s/src/rules/__tests__/shorterThan.test.ts +++ b/packages/n4s/src/rules/__tests__/shorterThan.test.ts @@ -1,6 +1,6 @@ import { faker } from '@faker-js/faker'; - import { shorterThan } from 'shorterThan'; +import { describe, it, expect } from 'vitest'; describe('Tests shorterThan rule', () => { const length = 10; diff --git a/packages/n4s/src/rules/__tests__/shorterThanOrEquals.test.ts b/packages/n4s/src/rules/__tests__/shorterThanOrEquals.test.ts index 17fa41a34..bfc48df18 100644 --- a/packages/n4s/src/rules/__tests__/shorterThanOrEquals.test.ts +++ b/packages/n4s/src/rules/__tests__/shorterThanOrEquals.test.ts @@ -1,6 +1,6 @@ import { faker } from '@faker-js/faker'; - import { shorterThanOrEquals } from 'shorterThanOrEquals'; +import { describe, it, expect } from 'vitest'; describe('Tests shorterThanOrEquals rule', () => { const length = 10; diff --git a/packages/n4s/src/rules/__tests__/startsWith.test.ts b/packages/n4s/src/rules/__tests__/startsWith.test.ts index 7e9714053..ab964bc94 100644 --- a/packages/n4s/src/rules/__tests__/startsWith.test.ts +++ b/packages/n4s/src/rules/__tests__/startsWith.test.ts @@ -1,4 +1,5 @@ import { startsWith } from 'startsWith'; +import { describe, it, expect } from 'vitest'; describe('Tests isArray rule', () => { const word = 'meow'; diff --git a/packages/n4s/src/runtime/__tests__/enforceContext.test.ts b/packages/n4s/src/runtime/__tests__/enforceContext.test.ts index 92e94f235..8dfce618f 100644 --- a/packages/n4s/src/runtime/__tests__/enforceContext.test.ts +++ b/packages/n4s/src/runtime/__tests__/enforceContext.test.ts @@ -1,13 +1,14 @@ import { enforce } from 'enforce'; import * as ruleReturn from 'ruleReturn'; +import { describe, it, expect, beforeEach, vi } from 'vitest'; import 'schema'; import 'compounds'; -let keepContext = jest.fn(); +let keepContext = vi.fn(); describe('enforce.context', () => { beforeEach(() => { - keepContext = jest.fn(); + keepContext = vi.fn(); }); describe('base structure', () => { diff --git a/packages/n4s/src/runtime/__tests__/message.test.ts b/packages/n4s/src/runtime/__tests__/message.test.ts index ed51d89bc..d8a40a93c 100644 --- a/packages/n4s/src/runtime/__tests__/message.test.ts +++ b/packages/n4s/src/runtime/__tests__/message.test.ts @@ -1,5 +1,6 @@ import { enforce } from 'enforce'; import ruleReturn from 'ruleReturn'; +import { describe, it, expect, vi } from 'vitest'; describe('enforce..message()', () => { it('Should set the failure message in builtin rules', () => { @@ -30,7 +31,7 @@ describe('enforce..message()', () => { describe('.message callback', () => { it('Should be passed the rule value as the first argument', () => { - const msg = jest.fn(() => 'some message'); + const msg = vi.fn(() => 'some message'); const arg = {}; expect(enforce.equals(false).message(msg).run(arg)).toEqual( ruleReturn(false, 'some message'), @@ -39,7 +40,7 @@ describe('enforce..message()', () => { }); it('Should pass original messages the second argument if exists', () => { - const msg = jest.fn(() => 'some message'); + const msg = vi.fn(() => 'some message'); const arg = {}; expect( enforce.ruleWithFailureMessage(false).message(msg).run(arg), diff --git a/packages/vast/src/__tests__/vast.test.ts b/packages/vast/src/__tests__/vast.test.ts index ff5c3bb2a..c9f49998e 100644 --- a/packages/vast/src/__tests__/vast.test.ts +++ b/packages/vast/src/__tests__/vast.test.ts @@ -1,3 +1,5 @@ +import { describe, it, expect, beforeEach } from 'vitest'; + import { createState } from 'vast'; let state = createState(); @@ -120,7 +122,7 @@ describe('vast state', () => { describe('onStateChange and onUpdate handlers', () => { it('Should run onStateChange handler when updating the state', () => { - const onStateChange = jest.fn(); + const onStateChange = vi.fn(); state = createState(onStateChange); const useKey1 = state.registerStateKey('v1'); @@ -134,8 +136,8 @@ describe('vast state', () => { }); it('Should run onUpdate handler when updating the key', () => { - const onUpdate1 = jest.fn(); - const onUpdate2 = jest.fn(); + const onUpdate1 = vi.fn(); + const onUpdate2 = vi.fn(); state = createState(); const useKey1 = state.registerStateKey('v1', onUpdate1); @@ -159,8 +161,8 @@ describe('vast state', () => { }); it('Should first run onUpdate and then onStateChange', () => { - const onUpdate = jest.fn(); - const onChange = jest.fn(); + const onUpdate = vi.fn(); + const onChange = vi.fn(); state = createState(onChange); state.registerStateKey('v1', onUpdate); diff --git a/packages/vest-utils/src/__tests__/Predicates.test.ts b/packages/vest-utils/src/__tests__/Predicates.test.ts index d87a0d34d..cd2918afb 100644 --- a/packages/vest-utils/src/__tests__/Predicates.test.ts +++ b/packages/vest-utils/src/__tests__/Predicates.test.ts @@ -1,4 +1,5 @@ import { all, any } from 'Predicates'; +import { describe, it, vi, expect } from 'vitest'; describe('Predicates', () => { describe('all', () => { @@ -42,8 +43,8 @@ describe('Predicates', () => { }); it('Should pass each predicate the value', () => { - const spy1 = jest.fn(value => value > 0); - const spy2 = jest.fn(value => value < 10); + const spy1 = vi.fn(value => value > 0); + const spy2 = vi.fn(value => value < 10); const predicate = all(spy1, spy2); diff --git a/packages/vest-utils/src/__tests__/SimpleStateMachine.test.ts b/packages/vest-utils/src/__tests__/SimpleStateMachine.test.ts index 276903c7b..2380a290f 100644 --- a/packages/vest-utils/src/__tests__/SimpleStateMachine.test.ts +++ b/packages/vest-utils/src/__tests__/SimpleStateMachine.test.ts @@ -1,4 +1,5 @@ import { StateMachine } from 'SimpleStateMachine'; +import { describe, test, it, expect } from 'vitest'; describe('SimpleStateMachine', () => { test('sample', () => { diff --git a/packages/vest-utils/src/__tests__/StringObject.test.ts b/packages/vest-utils/src/__tests__/StringObject.test.ts index 3bc262cb6..92234f19c 100644 --- a/packages/vest-utils/src/__tests__/StringObject.test.ts +++ b/packages/vest-utils/src/__tests__/StringObject.test.ts @@ -1,4 +1,5 @@ import { StringObject } from 'StringObject'; +import { describe, test, expect } from 'vitest'; describe('StringObject', () => { test('returns an instance of String', () => { diff --git a/packages/vest-utils/src/__tests__/asArray.test.ts b/packages/vest-utils/src/__tests__/asArray.test.ts index 837ffa26d..79397f068 100644 --- a/packages/vest-utils/src/__tests__/asArray.test.ts +++ b/packages/vest-utils/src/__tests__/asArray.test.ts @@ -1,4 +1,5 @@ import asArray from 'asArray'; +import { describe, it, expect } from 'vitest'; describe('asArray', () => { it('should return an array', () => { diff --git a/packages/vest-utils/src/__tests__/bindNot.test.ts b/packages/vest-utils/src/__tests__/bindNot.test.ts index 2a1bb00b9..88d9aa150 100644 --- a/packages/vest-utils/src/__tests__/bindNot.test.ts +++ b/packages/vest-utils/src/__tests__/bindNot.test.ts @@ -1,12 +1,14 @@ +import { describe, test, expect, vi } from 'vitest'; + import { bindNot } from 'vest-utils'; describe('bindNot', () => { it('Should return return a function', () => { - expect(typeof bindNot(jest.fn())).toBe('function'); + expect(typeof bindNot(vi.fn())).toBe('function'); }); test('calling returned function runs accepted function', () => { - const fn = jest.fn(); + const fn = vi.fn(); expect(fn).not.toHaveBeenCalled(); const not = bindNot(fn); @@ -16,7 +18,7 @@ describe('bindNot', () => { }); it('Should pass arguments to accepted function', () => { - const fn = jest.fn(); + const fn = vi.fn(); const not = bindNot(fn); not(1, 2, 3, 4); diff --git a/packages/vest-utils/src/__tests__/bus.test.ts b/packages/vest-utils/src/__tests__/bus.test.ts index 48d3980d7..9f0ff92af 100644 --- a/packages/vest-utils/src/__tests__/bus.test.ts +++ b/packages/vest-utils/src/__tests__/bus.test.ts @@ -1,4 +1,5 @@ import { createBus } from 'bus'; +import { describe, it, expect, vi } from 'vitest'; describe('bus', () => { it('should be a function', () => { @@ -14,7 +15,7 @@ describe('bus', () => { it('should emit events', () => { const bus = createBus(); - const spy = jest.fn(); + const spy = vi.fn(); bus.on('test', spy); bus.emit('test'); expect(spy).toHaveBeenCalled(); @@ -22,7 +23,7 @@ describe('bus', () => { it('should emit events with data', () => { const bus = createBus(); - const spy = jest.fn(); + const spy = vi.fn(); bus.on('test', spy); bus.emit('test', 'testData'); expect(spy).toHaveBeenCalledWith('testData'); @@ -30,8 +31,8 @@ describe('bus', () => { it('should emit events with multiple listeners', () => { const bus = createBus(); - const spy1 = jest.fn(); - const spy2 = jest.fn(); + const spy1 = vi.fn(); + const spy2 = vi.fn(); bus.on('test', spy1); bus.on('test', spy2); bus.emit('test'); @@ -41,8 +42,8 @@ describe('bus', () => { it('should emit events with multiple listeners and data', () => { const bus = createBus(); - const spy1 = jest.fn(); - const spy2 = jest.fn(); + const spy1 = vi.fn(); + const spy2 = vi.fn(); bus.on('test', spy1); bus.on('test', spy2); bus.emit('test', 'test1'); @@ -52,7 +53,7 @@ describe('bus', () => { test('on returns an object with an `off` function', () => { const bus = createBus(); - const spy = jest.fn(); + const spy = vi.fn(); const off = bus.on('test', spy); expect(off).toBeInstanceOf(Object); expect(off.off).toBeInstanceOf(Function); @@ -60,7 +61,7 @@ describe('bus', () => { test('off should remove a listener', () => { const bus = createBus(); - const spy = jest.fn(); + const spy = vi.fn(); const off = bus.on('test', spy); off.off(); bus.emit('test'); @@ -69,8 +70,8 @@ describe('bus', () => { test('off should only remove specific handler', () => { const bus = createBus(); - const spy1 = jest.fn(); - const spy2 = jest.fn(); + const spy1 = vi.fn(); + const spy2 = vi.fn(); const off = bus.on('test', spy1); bus.on('test', spy2); off.off(); @@ -82,9 +83,9 @@ describe('bus', () => { describe('"ANY" wildcard (*)', () => { it('Should run the wildcard handler on any event', () => { const bus = createBus(); - const spy1 = jest.fn(); - const spy2 = jest.fn(); - const spy3 = jest.fn(); + const spy1 = vi.fn(); + const spy2 = vi.fn(); + const spy3 = vi.fn(); bus.on('t1', spy1); bus.on('t2', spy2); bus.on('*', spy3); @@ -103,10 +104,10 @@ describe('bus', () => { it('Should call the wildcard last, regardless of when it was defined', () => { const bus = createBus(); - const spy1 = jest.fn(); - const spy2 = jest.fn(); - const spy3 = jest.fn(); - const spy4 = jest.fn(); + const spy1 = vi.fn(); + const spy2 = vi.fn(); + const spy3 = vi.fn(); + const spy4 = vi.fn(); bus.on('t1', spy1); bus.on('*', spy4); bus.on('t1', spy2); diff --git a/packages/vest-utils/src/__tests__/cache.test.ts b/packages/vest-utils/src/__tests__/cache.test.ts index 7cfa4feb7..3a696bd36 100644 --- a/packages/vest-utils/src/__tests__/cache.test.ts +++ b/packages/vest-utils/src/__tests__/cache.test.ts @@ -1,4 +1,5 @@ import _ from 'lodash'; +import { describe, it, expect, beforeEach, vi } from 'vitest'; import { cache } from 'vest-utils'; @@ -18,7 +19,7 @@ describe('lib: cache', () => { describe('on cache miss', () => { it('Should call passed cache action function and return its value', () => { - const cacheAction = jest.fn(() => ({})); + const cacheAction = vi.fn(() => ({})); const res = c([{}], cacheAction); expect(cacheAction).toHaveBeenCalledTimes(1); expect(res).toBe(cacheAction.mock.results[0].value); @@ -27,7 +28,7 @@ describe('lib: cache', () => { describe('On cache hit', () => { it('Should return cached result', () => { - const cacheAction = jest.fn(() => { + const cacheAction = vi.fn(() => { Math.random(); }); const depsArray = [true, false, {}]; @@ -38,7 +39,7 @@ describe('lib: cache', () => { }); it('Should return without calling the cache action', () => { - const cacheAction = jest.fn(); + const cacheAction = vi.fn(); const depsArray = [Math.random()]; c(depsArray, cacheAction); expect(cacheAction).toHaveBeenCalledTimes(1); diff --git a/packages/vest-utils/src/__tests__/callEach.test.ts b/packages/vest-utils/src/__tests__/callEach.test.ts index c4eb7e916..a96122581 100644 --- a/packages/vest-utils/src/__tests__/callEach.test.ts +++ b/packages/vest-utils/src/__tests__/callEach.test.ts @@ -1,10 +1,11 @@ import callEach from 'callEach'; +import { describe, it, expect, vi } from 'vitest'; describe('callEach', () => { it('should call all functions in the array', () => { - const mockFn1 = jest.fn(); - const mockFn2 = jest.fn(); - const mockFn3 = jest.fn(); + const mockFn1 = vi.fn(); + const mockFn2 = vi.fn(); + const mockFn3 = vi.fn(); callEach([mockFn1, mockFn2, mockFn3]); diff --git a/packages/vest-utils/src/__tests__/defaultTo.test.ts b/packages/vest-utils/src/__tests__/defaultTo.test.ts index 0dc823a40..9b06ea18e 100644 --- a/packages/vest-utils/src/__tests__/defaultTo.test.ts +++ b/packages/vest-utils/src/__tests__/defaultTo.test.ts @@ -1,9 +1,11 @@ +import { describe, it, expect, vi } from 'vitest'; + import { defaultTo } from 'vest-utils'; describe('defaultTo', () => { describe('When value is a function', () => { it('Should call the function', () => { - const value = jest.fn(() => 'return value'); + const value = vi.fn(() => 'return value'); expect(defaultTo(value, 'fallback value')).toBe('return value'); expect(value).toHaveBeenCalled(); @@ -41,7 +43,7 @@ describe('defaultTo', () => { describe('When the fallback value is a function', () => { it('Should call the function and return its return value', () => { - const fallbackValue = jest.fn(() => 'fallback value'); + const fallbackValue = vi.fn(() => 'fallback value'); expect(defaultTo(null, fallbackValue)).toBe('fallback value'); expect(fallbackValue).toHaveBeenCalled(); diff --git a/packages/vest-utils/src/__tests__/deferThrow.test.ts b/packages/vest-utils/src/__tests__/deferThrow.test.ts index 875ad3e79..9eea1c19a 100644 --- a/packages/vest-utils/src/__tests__/deferThrow.test.ts +++ b/packages/vest-utils/src/__tests__/deferThrow.test.ts @@ -1,11 +1,12 @@ -import { deferThrow } from 'vest-utils'; +import { describe, it, expect, beforeEach, vi, afterEach } from 'vitest'; +import { deferThrow } from 'vest-utils'; // @ts-ignore const _to = global.setTimeout; describe('deferThrow', () => { beforeEach(() => { // @ts-ignore - global.setTimeout = jest.fn(); + global.setTimeout = vi.fn(); }); afterEach(() => { diff --git a/packages/vest-utils/src/__tests__/either.test.ts b/packages/vest-utils/src/__tests__/either.test.ts index dbabe589b..176887a2e 100644 --- a/packages/vest-utils/src/__tests__/either.test.ts +++ b/packages/vest-utils/src/__tests__/either.test.ts @@ -1,4 +1,5 @@ import either from 'either'; +import { describe, it, expect } from 'vitest'; describe('either', () => { it('returns true if one argument is truthy and the other is falsy', () => { diff --git a/packages/vest-utils/src/__tests__/greaterThan.test.ts b/packages/vest-utils/src/__tests__/greaterThan.test.ts index eed74321c..c94eb9b07 100644 --- a/packages/vest-utils/src/__tests__/greaterThan.test.ts +++ b/packages/vest-utils/src/__tests__/greaterThan.test.ts @@ -1,6 +1,6 @@ import { faker } from '@faker-js/faker'; - import { greaterThan } from 'greaterThan'; +import { describe, it, expect, beforeEach } from 'vitest'; describe('Tests greaterThan rule', () => { describe('Arguments are numbers', () => { diff --git a/packages/vest-utils/src/__tests__/invariant.test.ts b/packages/vest-utils/src/__tests__/invariant.test.ts index 4ac8e0972..7137152dc 100644 --- a/packages/vest-utils/src/__tests__/invariant.test.ts +++ b/packages/vest-utils/src/__tests__/invariant.test.ts @@ -1,3 +1,5 @@ +import { describe, it, expect } from 'vitest'; + import { invariant } from 'vest-utils'; describe('invariant', () => { diff --git a/packages/vest-utils/src/__tests__/isArray.test.ts b/packages/vest-utils/src/__tests__/isArray.test.ts index 4897f856b..b6a16cc15 100644 --- a/packages/vest-utils/src/__tests__/isArray.test.ts +++ b/packages/vest-utils/src/__tests__/isArray.test.ts @@ -1,4 +1,5 @@ import { isArray } from 'isArrayValue'; +import { describe, it, expect } from 'vitest'; describe('Tests isArray rule', () => { it('Should return true for an empty array', () => { diff --git a/packages/vest-utils/src/__tests__/isBoolean.test.ts b/packages/vest-utils/src/__tests__/isBoolean.test.ts index 41e541c65..6efb96c1f 100644 --- a/packages/vest-utils/src/__tests__/isBoolean.test.ts +++ b/packages/vest-utils/src/__tests__/isBoolean.test.ts @@ -1,4 +1,5 @@ import isBoolean from 'isBooleanValue'; +import { describe, it, expect } from 'vitest'; describe('isBoolean', () => { it('Should pass for a boolean value', () => { diff --git a/packages/vest-utils/src/__tests__/isEmpty.test.ts b/packages/vest-utils/src/__tests__/isEmpty.test.ts index 297661ac9..e254a56af 100644 --- a/packages/vest-utils/src/__tests__/isEmpty.test.ts +++ b/packages/vest-utils/src/__tests__/isEmpty.test.ts @@ -1,3 +1,5 @@ +import { describe, it, expect } from 'vitest'; + import { isEmpty } from 'vest-utils'; describe('Tests isEmpty rule', () => { diff --git a/packages/vest-utils/src/__tests__/isNull.test.ts b/packages/vest-utils/src/__tests__/isNull.test.ts index 7e0b09455..8d5b5e746 100644 --- a/packages/vest-utils/src/__tests__/isNull.test.ts +++ b/packages/vest-utils/src/__tests__/isNull.test.ts @@ -1,4 +1,5 @@ import { isNull } from 'isNull'; +import { describe, it, expect } from 'vitest'; describe('Tests isNull rule', () => { it('Should return true for `null` value', () => { diff --git a/packages/vest-utils/src/__tests__/isNumeric.test.ts b/packages/vest-utils/src/__tests__/isNumeric.test.ts index f6f908064..3c461d512 100644 --- a/packages/vest-utils/src/__tests__/isNumeric.test.ts +++ b/packages/vest-utils/src/__tests__/isNumeric.test.ts @@ -1,4 +1,5 @@ import { isNumeric } from 'isNumeric'; +import { describe, it, expect } from 'vitest'; const NUMERICS = ['-10', '0', 0xff, '0xFF', '8e5', '3.1415', +10, '0144']; diff --git a/packages/vest-utils/src/__tests__/isPositive.test.ts b/packages/vest-utils/src/__tests__/isPositive.test.ts index f6cb36fc3..8a3360d32 100644 --- a/packages/vest-utils/src/__tests__/isPositive.test.ts +++ b/packages/vest-utils/src/__tests__/isPositive.test.ts @@ -1,4 +1,5 @@ import { isPositive } from 'isPositive'; +import { describe, it, expect } from 'vitest'; describe('Test isPositive rule', () => { it('Should return false for zero', () => { diff --git a/packages/vest-utils/src/__tests__/isPromise.test.ts b/packages/vest-utils/src/__tests__/isPromise.test.ts index 848da2fa6..abe6b7eaa 100644 --- a/packages/vest-utils/src/__tests__/isPromise.test.ts +++ b/packages/vest-utils/src/__tests__/isPromise.test.ts @@ -1,4 +1,5 @@ import isPromise from 'isPromise'; +import { describe, it, expect } from 'vitest'; describe('isPromise', () => { it('should return true for a Promise', () => { diff --git a/packages/vest-utils/src/__tests__/isString.test.ts b/packages/vest-utils/src/__tests__/isString.test.ts index 68475b2c9..c67ef5ee1 100644 --- a/packages/vest-utils/src/__tests__/isString.test.ts +++ b/packages/vest-utils/src/__tests__/isString.test.ts @@ -1,4 +1,5 @@ import isStringValue from 'isStringValue'; +import { describe, it, expect } from 'vitest'; describe('Tests isString rule', () => { it('Should return false for non-string values', () => { diff --git a/packages/vest-utils/src/__tests__/isUndefined.test.ts b/packages/vest-utils/src/__tests__/isUndefined.test.ts index fda820080..8db80887e 100644 --- a/packages/vest-utils/src/__tests__/isUndefined.test.ts +++ b/packages/vest-utils/src/__tests__/isUndefined.test.ts @@ -1,4 +1,5 @@ import { isUndefined } from 'isUndefined'; +import { describe, it, expect } from 'vitest'; describe('Tests isUndefined rule', () => { it('Should return true for `undefined` value', () => { diff --git a/packages/vest-utils/src/__tests__/lengthEquals.test.ts b/packages/vest-utils/src/__tests__/lengthEquals.test.ts index 4127820ae..21b8c1343 100644 --- a/packages/vest-utils/src/__tests__/lengthEquals.test.ts +++ b/packages/vest-utils/src/__tests__/lengthEquals.test.ts @@ -1,6 +1,6 @@ import { faker } from '@faker-js/faker'; - import { lengthEquals } from 'lengthEquals'; +import { describe, it, expect } from 'vitest'; describe('Tests lengthEquals rule', () => { const length = 10; diff --git a/packages/vest-utils/src/__tests__/longerThan.test.ts b/packages/vest-utils/src/__tests__/longerThan.test.ts index f0fe31f2e..06ca319ea 100644 --- a/packages/vest-utils/src/__tests__/longerThan.test.ts +++ b/packages/vest-utils/src/__tests__/longerThan.test.ts @@ -1,6 +1,6 @@ import { faker } from '@faker-js/faker'; - import { longerThan } from 'longerThan'; +import { describe, it, expect } from 'vitest'; describe('Tests longerThan rule', () => { const length = 10; diff --git a/packages/vest-utils/src/__tests__/mapFirst.test.ts b/packages/vest-utils/src/__tests__/mapFirst.test.ts index cca6ba150..2a411ca1a 100644 --- a/packages/vest-utils/src/__tests__/mapFirst.test.ts +++ b/packages/vest-utils/src/__tests__/mapFirst.test.ts @@ -1,3 +1,5 @@ +import { describe, it, expect } from 'vitest'; + import { mapFirst } from 'vest-utils'; describe('mapFirst', () => { diff --git a/packages/vest-utils/src/__tests__/nonnullish.test.ts b/packages/vest-utils/src/__tests__/nonnullish.test.ts index c1d5c0b96..9c4626427 100644 --- a/packages/vest-utils/src/__tests__/nonnullish.test.ts +++ b/packages/vest-utils/src/__tests__/nonnullish.test.ts @@ -1,4 +1,5 @@ import { nonnullish } from 'nonnullish'; +import { describe, it, expect } from 'vitest'; describe('nonnullish', () => { it('should return the value if it is not null or undefined', () => { diff --git a/packages/vest-utils/src/__tests__/numberEquals.test.ts b/packages/vest-utils/src/__tests__/numberEquals.test.ts index da7f04671..edf00bcbb 100644 --- a/packages/vest-utils/src/__tests__/numberEquals.test.ts +++ b/packages/vest-utils/src/__tests__/numberEquals.test.ts @@ -1,6 +1,6 @@ import { faker } from '@faker-js/faker'; - import { numberEquals } from 'numberEquals'; +import { describe, it, expect, beforeEach } from 'vitest'; describe('Tests numberEquals rule', () => { describe('Arguments are numbers', () => { diff --git a/packages/vest-utils/src/__tests__/optionalFunctionValue.test.ts b/packages/vest-utils/src/__tests__/optionalFunctionValue.test.ts index ede97ee76..60f4b3b91 100644 --- a/packages/vest-utils/src/__tests__/optionalFunctionValue.test.ts +++ b/packages/vest-utils/src/__tests__/optionalFunctionValue.test.ts @@ -1,3 +1,5 @@ +import { describe, it, expect, vi } from 'vitest'; + import { optionalFunctionValue } from 'vest-utils'; describe('optionalFunctionValue', () => { @@ -12,13 +14,13 @@ describe('optionalFunctionValue', () => { describe('When value is a function', () => { it('Should call the function and return its return value', () => { - const value = jest.fn(() => 'return value'); + const value = vi.fn(() => 'return value'); expect(optionalFunctionValue(value)).toBe('return value'); expect(value).toHaveBeenCalled(); }); it('Should run with arguments array', () => { - const value = jest.fn((...args) => args.join('|')); + const value = vi.fn((...args) => args.join('|')); const args = [1, 2, 3, 4]; expect(optionalFunctionValue(value, ...args)).toBe('1|2|3|4'); expect(value).toHaveBeenCalledWith(...args); diff --git a/packages/vest-utils/src/__tests__/seq.test.ts b/packages/vest-utils/src/__tests__/seq.test.ts index 6aa8d9de1..9bf15d59b 100644 --- a/packages/vest-utils/src/__tests__/seq.test.ts +++ b/packages/vest-utils/src/__tests__/seq.test.ts @@ -1,4 +1,5 @@ import seq, { genSeq } from 'seq'; +import { describe, it, expect } from 'vitest'; describe('lib:seq', () => { it('Should return a new id on each run', () => { diff --git a/packages/vest-utils/src/__tests__/text.test.ts b/packages/vest-utils/src/__tests__/text.test.ts index b3cbc8425..30cc7f03c 100644 --- a/packages/vest-utils/src/__tests__/text.test.ts +++ b/packages/vest-utils/src/__tests__/text.test.ts @@ -1,4 +1,5 @@ import { text } from 'text'; +import { describe, it, expect } from 'vitest'; describe('text', () => { describe('named substitutions (object)', () => { diff --git a/packages/vest-utils/src/__tests__/tinyState.test.ts b/packages/vest-utils/src/__tests__/tinyState.test.ts index 3b0e29bf1..aa3240159 100644 --- a/packages/vest-utils/src/__tests__/tinyState.test.ts +++ b/packages/vest-utils/src/__tests__/tinyState.test.ts @@ -1,4 +1,5 @@ import { createTinyState } from 'tinyState'; +import { describe, it, expect } from 'vitest'; describe('tinyTest', () => { it('Should be a function', () => { diff --git a/packages/vest-utils/src/exports/__tests__/minifyObject.test.ts b/packages/vest-utils/src/exports/__tests__/minifyObject.test.ts index 06ff16d96..cd2afdcd0 100644 --- a/packages/vest-utils/src/exports/__tests__/minifyObject.test.ts +++ b/packages/vest-utils/src/exports/__tests__/minifyObject.test.ts @@ -1,4 +1,5 @@ import { expandObject, minifyObject } from 'minifyObject'; +import { describe, it, expect } from 'vitest'; describe('minifyObject', () => { it('should be a 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 419afc8d7..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 @@ -1,6 +1,6 @@ -// Jest Snapshot v1, https://goo.gl/fbAQLP +// Vitest Snapshot v1, https://vitest.dev/guide/snapshot.html -exports[`Stateful behavior Should have all fields 1`] = ` +exports[`Stateful behavior > Should have all fields 1`] = ` { "field_1": SummaryBase { "errorCount": 1, 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 8a3f0265f..97d0c36ac 100644 --- a/packages/vest/src/__tests__/__snapshots__/integration.base.test.ts.snap +++ b/packages/vest/src/__tests__/__snapshots__/integration.base.test.ts.snap @@ -1,6 +1,6 @@ -// Jest Snapshot v1, https://goo.gl/fbAQLP +// Vitest Snapshot v1, https://vitest.dev/guide/snapshot.html -exports[`Base behavior Should produce correct validation result 1`] = ` +exports[`Base behavior > Should produce correct validation result 1`] = ` { "done": [Function], "errorCount": 2, 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 2548791fa..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 @@ -1,6 +1,6 @@ -// Jest Snapshot v1, https://goo.gl/fbAQLP +// Vitest Snapshot v1, https://vitest.dev/guide/snapshot.html -exports[`Stateful async tests Merges skipped validations from previous suite 1`] = ` +exports[`Stateful async tests > Merges skipped validations from previous suite 1`] = ` { "done": [Function], "errorCount": 1, @@ -97,7 +97,7 @@ exports[`Stateful async tests Merges skipped validations from previous suite 1`] } `; -exports[`Stateful async tests Merges skipped validations from previous suite 2`] = ` +exports[`Stateful async tests > Merges skipped validations from previous suite 2`] = ` SuiteSummary { "errorCount": 2, "errors": [ @@ -200,7 +200,7 @@ SuiteSummary { } `; -exports[`Stateful async tests Merges skipped validations from previous suite 3`] = ` +exports[`Stateful async tests > Merges skipped validations from previous suite 3`] = ` SuiteSummary { "errorCount": 5, "errors": [ 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 4ce52ac93..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 @@ -1,6 +1,6 @@ -// Jest Snapshot v1, https://goo.gl/fbAQLP +// Vitest Snapshot v1, https://vitest.dev/guide/snapshot.html -exports[`Stateful behavior Should merge skipped fields with previous values 1`] = ` +exports[`Stateful behavior > Should merge skipped fields with previous values 1`] = ` { "done": [Function], "errorCount": 1, @@ -85,7 +85,7 @@ exports[`Stateful behavior Should merge skipped fields with previous values 1`] } `; -exports[`Stateful behavior Should merge skipped fields with previous values 2`] = ` +exports[`Stateful behavior > Should merge skipped fields with previous values 2`] = ` { "done": [Function], "errorCount": 3, @@ -183,7 +183,7 @@ exports[`Stateful behavior Should merge skipped fields with previous values 2`] } `; -exports[`Stateful behavior Should merge skipped fields with previous values 3`] = ` +exports[`Stateful behavior > Should merge skipped fields with previous values 3`] = ` { "done": [Function], "errorCount": 4, @@ -296,7 +296,7 @@ exports[`Stateful behavior Should merge skipped fields with previous values 3`] } `; -exports[`more complex Should run correctly 1`] = ` +exports[`more complex > Should run correctly 1`] = ` SuiteSummary { "errorCount": 0, "errors": [], @@ -326,7 +326,7 @@ SuiteSummary { } `; -exports[`more complex Should run correctly 2`] = ` +exports[`more complex > Should run correctly 2`] = ` SuiteSummary { "errorCount": 0, "errors": [], @@ -384,7 +384,7 @@ SuiteSummary { } `; -exports[`more complex Should run correctly 4`] = ` +exports[`more complex > Should run correctly 4`] = ` SuiteSummary { "errorCount": 1, "errors": [ @@ -450,7 +450,7 @@ SuiteSummary { } `; -exports[`more complex Should run correctly 6`] = ` +exports[`more complex > Should run correctly 6`] = ` SuiteSummary { "errorCount": 1, "errors": [ diff --git a/packages/vest/src/__tests__/integration.async-tests.test.ts b/packages/vest/src/__tests__/integration.async-tests.test.ts index 748a0d180..3b3848fd7 100644 --- a/packages/vest/src/__tests__/integration.async-tests.test.ts +++ b/packages/vest/src/__tests__/integration.async-tests.test.ts @@ -1,9 +1,10 @@ +import { Modes } from 'Modes'; import { TTestSuite } from 'testUtils/TVestMock'; +import { describe, it, expect, beforeEach, beforeAll, test, vi } from 'vitest'; import wait from 'wait'; import { TestPromise } from '../testUtils/testPromise'; -import { Modes } from 'Modes'; import * as vest from 'vest'; function genSuite() { @@ -13,7 +14,7 @@ function genSuite() { vest.test('field_2', 'field_statement_2', () => { vest.enforce(2).equals(3); }); - vest.test('field_3', 'field_statement_3', jest.fn()); + vest.test('field_3', 'field_statement_3', vi.fn()); vest.test('field_4', 'field_statement_4', () => { vest.warn(); throw new Error(); @@ -33,20 +34,20 @@ function genSuite() { let suite: TTestSuite; describe('Stateful behavior', () => { let result, - callback_1 = jest.fn(), - callback_2 = jest.fn(), - callback_3 = jest.fn(), - control = jest.fn(); + callback_1 = vi.fn(), + callback_2 = vi.fn(), + callback_3 = vi.fn(), + control = vi.fn(); beforeEach(() => { suite = genSuite(); }); beforeAll(() => { - callback_1 = jest.fn(); - callback_2 = jest.fn(); - callback_3 = jest.fn(); - control = jest.fn(); + callback_1 = vi.fn(); + callback_2 = vi.fn(); + callback_3 = vi.fn(); + control = vi.fn(); }); test('Should have all fields', () => diff --git a/packages/vest/src/__tests__/integration.base.test.ts b/packages/vest/src/__tests__/integration.base.test.ts index 9e780d7ca..f5ab731c0 100644 --- a/packages/vest/src/__tests__/integration.base.test.ts +++ b/packages/vest/src/__tests__/integration.base.test.ts @@ -1,3 +1,5 @@ +import { describe, test, beforeEach, it, expect } from 'vitest'; + import * as vest from 'vest'; const suite = () => @@ -7,7 +9,7 @@ const suite = () => vest.test('field_2', 'field_statement_2', () => { expect(2).toBe(3); }); - vest.test('field_3', 'field_statement_3', jest.fn()); + vest.test('field_3', 'field_statement_3', vi.fn()); vest.test('field_4', 'field_statement_4', () => { vest.warn(); throw new Error(); @@ -37,7 +39,7 @@ describe('Base behavior', () => { }); it('Should run done callbacks immediately', () => { - const callback = jest.fn(); + const callback = vi.fn(); res.done(callback); expect(callback).toHaveBeenCalled(); diff --git a/packages/vest/src/__tests__/integration.exclusive.test.ts b/packages/vest/src/__tests__/integration.exclusive.test.ts index 6ff6882c5..57ef340eb 100644 --- a/packages/vest/src/__tests__/integration.exclusive.test.ts +++ b/packages/vest/src/__tests__/integration.exclusive.test.ts @@ -1,4 +1,6 @@ import { TTestSuite } from 'testUtils/TVestMock'; +import { describe, it, expect, beforeEach, test } from 'vitest'; + import * as vest from 'vest'; let suite: TTestSuite; diff --git a/packages/vest/src/__tests__/integration.stateful-async.test.ts b/packages/vest/src/__tests__/integration.stateful-async.test.ts index 096edbe93..e72cec1bb 100644 --- a/packages/vest/src/__tests__/integration.stateful-async.test.ts +++ b/packages/vest/src/__tests__/integration.stateful-async.test.ts @@ -1,12 +1,13 @@ +import { TIsolateTest } from 'IsolateTest'; +import { Modes } from 'Modes'; +import { TFieldName, TGroupName } from 'SuiteResultTypes'; +import { VestTest } from 'VestTest'; +import { describe, it, expect, vi, beforeEach } from 'vitest'; import wait from 'wait'; import { dummyTest } from '../testUtils/testDummy'; import { TestPromise } from '../testUtils/testPromise'; -import { TIsolateTest } from 'IsolateTest'; -import { Modes } from 'Modes'; -import { TFieldName, TGroupName } from 'SuiteResultTypes'; -import { VestTest } from 'VestTest'; import * as vest from 'vest'; type SuiteParams = { skip?: string; skipGroup?: true }; @@ -41,19 +42,19 @@ let validate: vest.Suite< TGroupName, ({ skip, skipGroup }: SuiteParams) => void >; -let callback_1 = jest.fn(), - callback_2 = jest.fn(), - callback_3 = jest.fn(), - callback_4 = jest.fn(), - control = jest.fn(); +let callback_1 = vi.fn(), + callback_2 = vi.fn(), + callback_3 = vi.fn(), + callback_4 = vi.fn(), + control = vi.fn(); describe('Stateful async tests', () => { beforeEach(() => { - callback_1 = jest.fn(); - callback_2 = jest.fn(); - callback_3 = jest.fn(); - callback_4 = jest.fn(); - control = jest.fn(); + callback_1 = vi.fn(); + callback_2 = vi.fn(); + callback_3 = vi.fn(); + callback_4 = vi.fn(); + control = vi.fn(); validate = suite(); }); @@ -121,7 +122,7 @@ describe('Stateful async tests', () => { it('Should discard of re-tested async tests', async () => { const tests: Array = []; - const control = jest.fn(); + const control = vi.fn(); const suite = vest.create(() => { tests.push( vest.test('field_1', tests.length.toString(), async () => { diff --git a/packages/vest/src/__tests__/integration.stateful-tests.test.ts b/packages/vest/src/__tests__/integration.stateful-tests.test.ts index 3f953453a..488b2f45f 100644 --- a/packages/vest/src/__tests__/integration.stateful-tests.test.ts +++ b/packages/vest/src/__tests__/integration.stateful-tests.test.ts @@ -1,6 +1,7 @@ +import { Modes } from 'Modes'; import { enforce } from 'n4s'; +import { describe, it, expect, test } from 'vitest'; -import { Modes } from 'Modes'; import * as vest from 'vest'; describe('Stateful behavior', () => { @@ -147,7 +148,7 @@ function genSuite() { vest.test('field_2', 'field_statement_2', () => { enforce(2).equals(3); }); - vest.test('field_3', 'field_statement_3', jest.fn()); + vest.test('field_3', 'field_statement_3', vi.fn()); vest.test('field_4', 'field_statement_4', () => { vest.warn(); throw new Error(); diff --git a/packages/vest/src/__tests__/isolate.test.ts b/packages/vest/src/__tests__/isolate.test.ts index 81521221b..6d8ce5c53 100644 --- a/packages/vest/src/__tests__/isolate.test.ts +++ b/packages/vest/src/__tests__/isolate.test.ts @@ -1,36 +1,23 @@ -import { CB } from 'vest-utils'; -import { TDeferThrow } from 'vest-utils/src/deferThrow'; +import { CB, deferThrow } from 'vest-utils'; import { Isolate } from 'vestjs-runtime'; +import { describe, it, expect, vi, beforeEach } from 'vitest'; -import { TVestMock } from '../testUtils/TVestMock'; -import mockThrowError from '../testUtils/mockThrowError'; -import { TDummyTest } from '../testUtils/testDummy'; +import { dummyTest } from 'testDummy'; +import * as vest from 'vest'; + +vi.mock('vest-utils', async () => { + const vu = await vi.importActual('vest-utils'); + return { + ...vu, + deferThrow: vi.fn(), + }; +}); describe('isolate', () => { - let vest: TVestMock; let firstRun = true; - // eslint-disable-next-line no-unused-expressions - require('IsolateTest').IsolateTest; - // eslint-disable-next-line no-unused-expressions - require('IsolateEach').IsolateEach; - let dummyTest: TDummyTest; - let deferThrow: TDeferThrow; beforeEach(() => { firstRun = true; - const mock = mockThrowError(); - deferThrow = mock.deferThrow; - // eslint-disable-next-line no-unused-expressions - require('IsolateTest').IsolateTest; - // eslint-disable-next-line no-unused-expressions - require('IsolateEach').IsolateEach; - vest = mock.vest; - dummyTest = require('../testUtils/testDummy').dummyTest; - }); - - afterEach(() => { - jest.resetModules(); - jest.resetAllMocks(); }); describe('Base behavior', () => { @@ -40,8 +27,8 @@ describe('isolate', () => { }); it('Should retain test results between runs', () => { - const f1 = jest.fn(() => false); - const f2 = jest.fn(() => false); + const f1 = vi.fn(() => false); + const f2 = vi.fn(() => false); const suite = genSuite(() => { vest.skipWhen(!firstRun, () => { vest.test('f1', f1); @@ -254,9 +241,7 @@ describe('isolate', () => { }); suite(); - expect(deferThrow).toHaveBeenCalledTimes(0); suite(); - expect(deferThrow).toHaveBeenCalledTimes(1); expect(deferThrow).toHaveBeenCalledWith( expect.stringContaining( 'Vest Critical Error: Tests called in different order than previous run', diff --git a/packages/vest/src/__tests__/state_refill.test.ts b/packages/vest/src/__tests__/state_refill.test.ts index 66cc0f1a0..1cf53194c 100644 --- a/packages/vest/src/__tests__/state_refill.test.ts +++ b/packages/vest/src/__tests__/state_refill.test.ts @@ -1,4 +1,6 @@ import { Modes } from 'Modes'; +import { describe, it, expect } from 'vitest'; + import * as vest from 'vest'; describe('state refill', () => { 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 7f6d7f260..07e283703 100644 --- a/packages/vest/src/core/__tests__/__snapshots__/runtime.test.ts.snap +++ b/packages/vest/src/core/__tests__/__snapshots__/runtime.test.ts.snap @@ -1,6 +1,6 @@ -// Jest Snapshot v1, https://goo.gl/fbAQLP +// Vitest Snapshot v1, https://vitest.dev/guide/snapshot.html -exports[`useLoadSuite Calling useLoadSuite should resume from loaded state 1`] = ` +exports[`useLoadSuite > Calling useLoadSuite should resume from loaded state 1`] = ` { "$type": "Suite", "abortController": AbortController {}, @@ -354,7 +354,7 @@ exports[`useLoadSuite Calling useLoadSuite should resume from loaded state 1`] = } `; -exports[`useLoadSuite Calling useLoadSuite should resume from loaded state 2`] = ` +exports[`useLoadSuite > Calling useLoadSuite should resume from loaded state 2`] = ` SuiteSummary { "errorCount": 4, "errors": [ diff --git a/packages/vest/src/core/__tests__/runtime.test.ts b/packages/vest/src/core/__tests__/runtime.test.ts index 3738151be..0fea460d1 100644 --- a/packages/vest/src/core/__tests__/runtime.test.ts +++ b/packages/vest/src/core/__tests__/runtime.test.ts @@ -1,3 +1,5 @@ +import { describe, it, expect } from 'vitest'; + import * as vest from 'vest'; describe('useLoadSuite', () => { diff --git a/packages/vest/src/core/isolate/IsolateTest/__tests__/VestTestInspector.test.ts b/packages/vest/src/core/isolate/IsolateTest/__tests__/VestTestInspector.test.ts index 167c47d06..16b8bd1f5 100644 --- a/packages/vest/src/core/isolate/IsolateTest/__tests__/VestTestInspector.test.ts +++ b/packages/vest/src/core/isolate/IsolateTest/__tests__/VestTestInspector.test.ts @@ -2,6 +2,7 @@ import { TIsolateTest } from 'IsolateTest'; import { TestStatus } from 'IsolateTestStateMachine'; import { VestTest } from 'VestTest'; import { mockIsolateTest } from 'vestMocks'; +import { describe, it, expect, beforeEach } from 'vitest'; describe('VestTest', () => { let testObject: TIsolateTest; diff --git a/packages/vest/src/core/isolate/IsolateTest/__tests__/hasRemainingTests.test.ts b/packages/vest/src/core/isolate/IsolateTest/__tests__/hasRemainingTests.test.ts index 11de5a269..40a1cc4de 100644 --- a/packages/vest/src/core/isolate/IsolateTest/__tests__/hasRemainingTests.test.ts +++ b/packages/vest/src/core/isolate/IsolateTest/__tests__/hasRemainingTests.test.ts @@ -1,6 +1,7 @@ +import { SuiteWalker } from 'SuiteWalker'; +import { describe, it, expect, beforeEach } from 'vitest'; import wait from 'wait'; -import { SuiteWalker } from 'SuiteWalker'; import * as vest from 'vest'; describe('SuiteWalker.useHasRemainingWithTestNameMatching', () => { diff --git a/packages/vest/src/core/test/__tests__/IsolateTest.test.ts b/packages/vest/src/core/test/__tests__/IsolateTest.test.ts index 44e6e4d58..2ab6ea20e 100644 --- a/packages/vest/src/core/test/__tests__/IsolateTest.test.ts +++ b/packages/vest/src/core/test/__tests__/IsolateTest.test.ts @@ -1,11 +1,12 @@ +import { TIsolateTest } from 'IsolateTest'; +import { VestTest } from 'VestTest'; +import { mockIsolateTest } from 'vestMocks'; +import { describe, it, expect, beforeEach, test, vi } from 'vitest'; import wait from 'wait'; import { TestPromise } from '../../../testUtils/testPromise'; -import { TIsolateTest } from 'IsolateTest'; -import { VestTest } from 'VestTest'; import * as vest from 'vest'; -import { mockIsolateTest } from 'vestMocks'; const fieldName = 'unicycle'; const message = 'I am Root.'; @@ -38,10 +39,6 @@ describe('IsolateTest', () => { testObject = mockIsolateTest({ fieldName, message }); }); - afterEach(() => { - jest.resetAllMocks(); - }); - it('Should set status to failed', () => { expect(VestTest.isFailing(testObject)).toBe(false); VestTest.fail(testObject); @@ -70,9 +67,9 @@ describe('IsolateTest', () => { }); describe('final statuses', () => { - let control = jest.fn(); + const control = vi.fn(); beforeEach(() => { - control = jest.fn(); + vi.resetAllMocks(); }); it('keep status unchanged when `failed`', () => { vest.create(() => { 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 cca6b3055..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 @@ -1,6 +1,6 @@ -// Jest Snapshot v1, https://goo.gl/fbAQLP +// Vitest Snapshot v1, https://vitest.dev/guide/snapshot.html -exports[`IsolateTest TestObject constructor 1`] = ` +exports[`IsolateTest > TestObject constructor 1`] = ` { "$type": "UnitTest", "children": [], @@ -8,7 +8,7 @@ exports[`IsolateTest TestObject constructor 1`] = ` "fieldName": "unicycle", "message": "I am Root.", "severity": "error", - "testFn": [MockFunction], + "testFn": [MockFunction spy], "type": "Test", }, "key": null, @@ -19,7 +19,7 @@ exports[`IsolateTest TestObject constructor 1`] = ` } `; -exports[`IsolateTest testObject.warn Should mark the test as warning 1`] = ` +exports[`IsolateTest > testObject.warn > Should mark the test as warning 1`] = ` { "$type": "UnitTest", "children": [], @@ -27,7 +27,7 @@ exports[`IsolateTest testObject.warn Should mark the test as warning 1`] = ` "fieldName": "unicycle", "message": "I am Root.", "severity": "warning", - "testFn": [MockFunction], + "testFn": [MockFunction spy], "type": "Test", }, "key": null, 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 7a6958c86..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 @@ -1,6 +1,6 @@ -// Jest Snapshot v1, https://goo.gl/fbAQLP +// Vitest Snapshot v1, https://vitest.dev/guide/snapshot.html -exports[`test.memo cache hit Should produce correct initial result 1`] = ` +exports[`test.memo > cache hit > Should produce correct initial result 1`] = ` { "done": [Function], "errorCount": 1, @@ -73,7 +73,7 @@ exports[`test.memo cache hit Should produce correct initial result 1`] = ` } `; -exports[`test.memo cache hit sync Should restore previous result on re-run 1`] = ` +exports[`test.memo > cache hit > sync > Should restore previous result on re-run 1`] = ` { "done": [Function], "errorCount": 1, 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 405ce559f..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 @@ -1,8 +1,8 @@ -// Jest Snapshot v1, https://goo.gl/fbAQLP +// Vitest Snapshot v1, https://vitest.dev/guide/snapshot.html -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 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`] = ` +exports[`Test Vest's \`test\` function > test params > creates a test without a key 1`] = ` { "$type": "Test", "abortController": AbortController {}, @@ -74,7 +74,7 @@ exports[`Test Vest's \`test\` function test params creates a test without a key } `; -exports[`Test Vest's \`test\` function test params creates a test without a message and with a key 1`] = ` +exports[`Test Vest's \`test\` function > test params > creates a test without a message and with a key 1`] = ` { "$type": "Test", "abortController": AbortController {}, @@ -147,7 +147,7 @@ exports[`Test Vest's \`test\` function test params creates a test without a mess } `; -exports[`Test Vest's \`test\` function test params creates a test without a message and without a key 1`] = ` +exports[`Test Vest's \`test\` function > test params > creates a test without a message and without a key 1`] = ` { "$type": "Test", "abortController": AbortController {}, diff --git a/packages/vest/src/core/test/__tests__/key.test.ts b/packages/vest/src/core/test/__tests__/key.test.ts index 218d9bfc0..d694f2463 100644 --- a/packages/vest/src/core/test/__tests__/key.test.ts +++ b/packages/vest/src/core/test/__tests__/key.test.ts @@ -1,11 +1,17 @@ -import { TDeferThrow } from 'vest-utils/src/deferThrow'; - -import { TVestMock } from '../../../testUtils/TVestMock'; -import mockThrowError from '../../../testUtils/mockThrowError'; +import { deferThrow } from 'vest-utils'; +import { describe, it, expect, vi } from 'vitest'; import { TIsolateTest } from 'IsolateTest'; import * as vest from 'vest'; +vi.mock('vest-utils', async () => { + const vu = await vi.importActual('vest-utils'); + return { + ...vu, + deferThrow: vi.fn(), + }; +}); + describe('key', () => { describe('When key is provided', () => { describe('When tests change their order between runs', () => { @@ -77,14 +83,6 @@ describe('key', () => { }); describe('When tests without a key reorder get added above a test with a key', () => { - let vest: TVestMock; - beforeEach(() => { - vest = mockThrowError().vest; - }); - afterEach(() => { - jest.resetModules(); - jest.resetAllMocks(); - }); it('Should retain keyd tests', () => { const calls: TIsolateTest[][] = []; const suite = vest.create(() => { @@ -108,6 +106,8 @@ describe('key', () => { const res1 = suite(); const res2 = suite(); + expect(deferThrow).toHaveBeenCalled(); + expect(calls[0][0]).toBe(calls[1][0]); expect(calls[0][1]).toBe(calls[1][1]); expect(calls[0][2]).toBe(calls[1][2]); @@ -199,24 +199,12 @@ describe('key', () => { }); describe('When the same key is encountered twice', () => { - let deferThrow: TDeferThrow, vest: TVestMock; - beforeEach(() => { - const mock = mockThrowError(); - - deferThrow = mock.deferThrow; - vest = mock.vest; - }); - - afterEach(() => { - jest.resetAllMocks(); - jest.resetModules(); - }); - - it('Should throw a deferred error', () => { + it('Should throw a deferred error', async () => { const suite = vest.create(() => { vest.test('field1', () => false, 'key_1'); vest.test('field2', () => false, 'key_1'); }); + suite(); expect(deferThrow).toHaveBeenCalledWith( `Encountered the same key "key_1" twice. This may lead to inconsistent or overriding of results.`, diff --git a/packages/vest/src/core/test/__tests__/memo.test.ts b/packages/vest/src/core/test/__tests__/memo.test.ts index daee15668..f0afeeb52 100644 --- a/packages/vest/src/core/test/__tests__/memo.test.ts +++ b/packages/vest/src/core/test/__tests__/memo.test.ts @@ -1,19 +1,20 @@ -import wait from 'wait'; - -import { TestPromise } from '../../../testUtils/testPromise'; - import { TIsolateTest } from 'IsolateTest'; import { Modes } from 'Modes'; import { VestTest } from 'VestTest'; import promisify from 'promisify'; +import { describe, it, expect, vi } from 'vitest'; +import wait from 'wait'; + +import { TestPromise } from '../../../testUtils/testPromise'; + import * as vest from 'vest'; import { test as vestTest, enforce } from 'vest'; describe('test.memo', () => { describe('cache hit', () => { it('Should return without calling callback', () => { - const cb1 = jest.fn(); - const cb2 = jest.fn(() => TestPromise(() => undefined)); + const cb1 = vi.fn(); + const cb2 = vi.fn(() => TestPromise(() => undefined)); const suite = vest.create(() => { vestTest.memo('f1', cb1, [1]); vestTest.memo('f1', cb2, [2]); @@ -150,8 +151,8 @@ describe('test.memo', () => { describe('cache miss', () => { it('Should run test normally', () => { - const cb1 = jest.fn(res => res); - const cb2 = jest.fn( + const cb1 = vi.fn(res => res); + const cb2 = vi.fn( res => new Promise((resolve, rej) => (res ? resolve() : rej())), ); const suite = vest.create((key, res) => { diff --git a/packages/vest/src/core/test/__tests__/merging_of_previous_test_runs.test.ts b/packages/vest/src/core/test/__tests__/merging_of_previous_test_runs.test.ts index 1dddcfee5..ae3851dc6 100644 --- a/packages/vest/src/core/test/__tests__/merging_of_previous_test_runs.test.ts +++ b/packages/vest/src/core/test/__tests__/merging_of_previous_test_runs.test.ts @@ -1,11 +1,21 @@ -import { TTestSuite, TVestMock } from '../../../testUtils/TVestMock'; -import mockThrowError from '../../../testUtils/mockThrowError'; +import { deferThrow } from 'vest-utils'; +import { describe, it, expect, beforeEach, vi, afterEach } from 'vitest'; + +import { TTestSuite } from '../../../testUtils/TVestMock'; import { dummyTest } from '../../../testUtils/testDummy'; import { TIsolateTest } from 'IsolateTest'; import { Modes } from 'Modes'; import * as vest from 'vest'; +vi.mock('vest-utils', async () => { + const vu = await vi.importActual('vest-utils'); + return { + ...vu, + deferThrow: vi.fn(), + }; +}); + describe('Merging of previous test runs', () => { let suite: TTestSuite; let counter = 0; @@ -15,6 +25,7 @@ describe('Merging of previous test runs', () => { counter = 0; testContainer = []; }); + describe('When test skipped in subsequent run', () => { it('Should merge its result from previous runs', () => { suite = vest.create(() => { @@ -76,22 +87,11 @@ describe('Merging of previous test runs', () => { }); describe('When tests are passed in a different order between runs', () => { - let deferThrow: (message: string) => void, vest: TVestMock; - beforeEach(() => { - const mock = mockThrowError(); - deferThrow = mock.deferThrow; - vest = mock.vest; - }); - - afterAll(() => { - jest.resetAllMocks(); - }); - it('Should defer-throw an error', () => { suite = vest.create(() => { testContainer.push([ counter === 0 - ? vest.test('f1', jest.fn()) + ? vest.test('f1', vi.fn()) : vest.test('f2', () => false), ]); counter++; @@ -101,7 +101,6 @@ describe('Merging of previous test runs', () => { expect(deferThrow).not.toHaveBeenCalled(); suite(); - expect(deferThrow).toHaveBeenCalledWith( expect.stringContaining( 'Vest Critical Error: Tests called in different order than previous run.', diff --git a/packages/vest/src/core/test/__tests__/runAsyncTest.test.ts b/packages/vest/src/core/test/__tests__/runAsyncTest.test.ts index faf2851b5..f7e062a6e 100644 --- a/packages/vest/src/core/test/__tests__/runAsyncTest.test.ts +++ b/packages/vest/src/core/test/__tests__/runAsyncTest.test.ts @@ -1,7 +1,8 @@ -import wait from 'wait'; - import { TIsolateTest } from 'IsolateTest'; import { VestTest } from 'VestTest'; +import { describe, it, expect, vi } from 'vitest'; +import wait from 'wait'; + import * as vest from 'vest'; describe('runAsyncTest', () => { @@ -26,9 +27,9 @@ describe('runAsyncTest', () => { describe('Callbacks', () => { describe('When there are no remaining pending tests', () => { it('Should run all callbacks', async () => { - const cb1 = jest.fn(); - const cb2 = jest.fn(); - const cb3 = jest.fn(); + const cb1 = vi.fn(); + const cb2 = vi.fn(); + const cb3 = vi.fn(); const suite = vest.create(() => { vest.test('field_1', async () => { @@ -58,9 +59,9 @@ describe('runAsyncTest', () => { describe('When there are remaining pending tests', () => { it('Should only run callbacks for completed tests', async () => { - const cb1 = jest.fn(); - const cb2 = jest.fn(); - const cb3 = jest.fn(); + const cb1 = vi.fn(); + const cb2 = vi.fn(); + const cb3 = vi.fn(); const suite = vest.create(() => { vest.test('field_1', async () => { @@ -89,9 +90,9 @@ describe('runAsyncTest', () => { describe('When the test run was canceled', () => { it('Should not run the callbacks', async () => { - const cb1 = jest.fn(); - const cb2 = jest.fn(); - const cb3 = jest.fn(); + const cb1 = vi.fn(); + const cb2 = vi.fn(); + const cb3 = vi.fn(); const testObject: Array = []; diff --git a/packages/vest/src/core/test/__tests__/test.test.ts b/packages/vest/src/core/test/__tests__/test.test.ts index 9ac8af15d..64722f5ee 100644 --- a/packages/vest/src/core/test/__tests__/test.test.ts +++ b/packages/vest/src/core/test/__tests__/test.test.ts @@ -1,12 +1,13 @@ import { faker } from '@faker-js/faker'; +import { ErrorStrings } from 'ErrorStrings'; +import { TIsolateTest } from 'IsolateTest'; +import { VestTest } from 'VestTest'; import { text } from 'vest-utils'; import { IsolateSerializer } from 'vestjs-runtime'; +import { describe, it, expect, vi } from 'vitest'; import { TestPromise } from '../../../testUtils/testPromise'; -import { ErrorStrings } from 'ErrorStrings'; -import { TIsolateTest } from 'IsolateTest'; -import { VestTest } from 'VestTest'; import { enforce } from 'vest'; import * as vest from 'vest'; @@ -196,7 +197,7 @@ describe("Test Vest's `test` function", () => { }); it('throws when field name is not a string', () => { - const control = jest.fn(); + const control = vi.fn(); vest.create(() => { // @ts-ignore expect(() => vest.test(undefined, () => undefined)).toThrow( @@ -230,7 +231,7 @@ describe("Test Vest's `test` function", () => { }); it('throws when callback is not a function', () => { - const control = jest.fn(); + const control = vi.fn(); vest.create(() => { // @ts-expect-error expect(() => vest.test('x')).toThrow( diff --git a/packages/vest/src/core/test/__tests__/testFunctionPayload.test.ts b/packages/vest/src/core/test/__tests__/testFunctionPayload.test.ts index f252ffe0a..396eca5e1 100644 --- a/packages/vest/src/core/test/__tests__/testFunctionPayload.test.ts +++ b/packages/vest/src/core/test/__tests__/testFunctionPayload.test.ts @@ -1,10 +1,12 @@ +import { describe, it, expect, vi } from 'vitest'; + import * as vest from 'vest'; describe('Test Function Payload', () => { describe('AbortSignal', () => { it('Should pass abort signal to test functions', () => { - const testFnSync = jest.fn(); - const testFnAsync = jest.fn().mockResolvedValue(undefined); + const testFnSync = vi.fn(); + const testFnAsync = vi.fn().mockResolvedValue(undefined); const suite = vest.create(() => { vest.test('field_1', testFnSync); vest.test('field_2', testFnAsync); @@ -17,7 +19,7 @@ describe('Test Function Payload', () => { describe('When test is not canceled', () => { it('Should proceed without aborting the test', async () => { - const testFn = jest.fn().mockResolvedValue(undefined); + const testFn = vi.fn().mockResolvedValue(undefined); const suite = vest.create(() => { vest.test('field_1', testFn); }); @@ -29,7 +31,7 @@ describe('Test Function Payload', () => { describe('When test is canceled', () => { it('Should abort the test', async () => { - const testFn = jest.fn().mockResolvedValue(undefined); + const testFn = vi.fn().mockResolvedValue(undefined); const suite = vest.create(() => { vest.test('field_1', testFn); }); @@ -41,7 +43,7 @@ describe('Test Function Payload', () => { }); it('Should set the reason to `canceled`', async () => { - const testFn = jest.fn().mockResolvedValue(undefined); + const testFn = vi.fn().mockResolvedValue(undefined); const suite = vest.create(() => { vest.test('field_1', testFn); }); @@ -54,8 +56,8 @@ describe('Test Function Payload', () => { describe('Multiple async tests', () => { it('Should abort only the canceled test', async () => { - const testFn1 = jest.fn().mockResolvedValue(undefined); - const testFn2 = jest.fn().mockResolvedValue(undefined); + const testFn1 = vi.fn().mockResolvedValue(undefined); + const testFn2 = vi.fn().mockResolvedValue(undefined); const suite = vest.create((only?: string) => { vest.only(only); @@ -75,7 +77,7 @@ describe('Test Function Payload', () => { }); function callPayload( - fn: jest.Mock, + fn: vi.Mock, call: number = 0, arg: number = 0, ) { diff --git a/packages/vest/src/core/test/helpers/__tests__/nonMatchingSeverityProfile.test.ts b/packages/vest/src/core/test/helpers/__tests__/nonMatchingSeverityProfile.test.ts index fc326bb9b..40f182a22 100644 --- a/packages/vest/src/core/test/helpers/__tests__/nonMatchingSeverityProfile.test.ts +++ b/packages/vest/src/core/test/helpers/__tests__/nonMatchingSeverityProfile.test.ts @@ -1,9 +1,9 @@ -import { VestTest } from 'VestTest'; - import { TIsolateTest } from 'IsolateTest'; import { Severity } from 'Severity'; +import { VestTest } from 'VestTest'; import { nonMatchingSeverityProfile } from 'nonMatchingSeverityProfile'; import { mockIsolateTest } from 'vestMocks'; +import { describe, it, expect, beforeEach } from 'vitest'; describe('nonMatchingSeverityProfile', () => { let testObject: TIsolateTest; diff --git a/packages/vest/src/exports/__tests__/SuiteSerializer.test.ts b/packages/vest/src/exports/__tests__/SuiteSerializer.test.ts index 3fb676811..ca58221dd 100644 --- a/packages/vest/src/exports/__tests__/SuiteSerializer.test.ts +++ b/packages/vest/src/exports/__tests__/SuiteSerializer.test.ts @@ -1,4 +1,6 @@ import { SuiteSerializer } from 'SuiteSerializer'; +import { describe, it, expect } from 'vitest'; + import * as vest from 'vest'; describe('SuiteSerializer', () => { 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 de6445f54..a5a5fa44f 100644 --- a/packages/vest/src/exports/__tests__/__snapshots__/SuiteSerializer.test.ts.snap +++ b/packages/vest/src/exports/__tests__/__snapshots__/SuiteSerializer.test.ts.snap @@ -1,8 +1,8 @@ -// Jest Snapshot v1, https://goo.gl/fbAQLP +// Vitest Snapshot v1, https://vitest.dev/guide/snapshot.html -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`] = ` +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", diff --git a/packages/vest/src/exports/__tests__/classnames.test.ts b/packages/vest/src/exports/__tests__/classnames.test.ts index 1c6dabea3..fe998d1aa 100644 --- a/packages/vest/src/exports/__tests__/classnames.test.ts +++ b/packages/vest/src/exports/__tests__/classnames.test.ts @@ -1,8 +1,10 @@ +import { Modes } from 'Modes'; +import { describe, it, expect, vi } from 'vitest'; + import { dummyTest } from '../../testUtils/testDummy'; import classnames from '../classnames'; import promisify from '../promisify'; -import { Modes } from 'Modes'; import * as vest from 'vest'; describe('Utility: classnames', () => { @@ -21,14 +23,14 @@ describe('Utility: classnames', () => { describe('When called with a vest result object', () => { it('Should return a function', async () => { const validate = vest.create( - jest.fn(() => { + vi.fn(() => { dummyTest.failing('field_0'); }), ); expect(typeof classnames(validate())).toBe('function'); const promisifed = await promisify( vest.create( - jest.fn(() => { + vi.fn(() => { dummyTest.failing('field_0'); }), ), diff --git a/packages/vest/src/exports/__tests__/debounce.test.ts b/packages/vest/src/exports/__tests__/debounce.test.ts index 7e6575c66..7e0fbac00 100644 --- a/packages/vest/src/exports/__tests__/debounce.test.ts +++ b/packages/vest/src/exports/__tests__/debounce.test.ts @@ -1,14 +1,15 @@ +import { describe, it, expect, vi } from 'vitest'; import wait from 'wait'; import { TestFnPayload } from 'TestTypes'; +import debounce from 'debounce'; import * as vest from 'vest'; -import debounce from 'vest/debounce'; describe('debounce', () => { describe('Sync test', () => { describe('Returning false', () => { it('Should debounce test function calls when used', () => { - const test = jest.fn(() => { + const test = vi.fn(() => { return false; }); @@ -34,7 +35,7 @@ describe('debounce', () => { describe('Throwing an error', () => { it('Should debounce test function calls when used', () => { - const test = jest.fn(() => { + const test = vi.fn(() => { throw new Error(); }); @@ -61,7 +62,7 @@ describe('debounce', () => { describe('Async test', () => { it('Should complete the async test after the delay', async () => { - const t = jest.fn(async () => { + const t = vi.fn(async () => { await wait(1000); vest.enforce(1).equals(2); }); @@ -85,7 +86,7 @@ describe('debounce', () => { describe('When delay met multiple times', () => { it('Should call once per completed delay', async () => { - const test = jest.fn(() => { + const test = vi.fn(() => { return false; }); @@ -116,7 +117,7 @@ describe('debounce', () => { describe('Debounced tests with non-debounced tests', () => { it('Should complete non-debounced tests immediately', () => { - const test = jest.fn(() => { + const test = vi.fn(() => { return false; }); @@ -141,7 +142,7 @@ describe('debounce', () => { describe('Multiple debounced fields', () => { it('Should conclude them on their own time', () => { - const t = jest.fn(() => { + const t = vi.fn(() => { return false; }); @@ -151,7 +152,7 @@ describe('debounce', () => { vest.test('test3', 'message', debounce(t, 2000)); }); - const control = jest.fn(); + const control = vi.fn(); return new Promise(done => { suite(); @@ -196,10 +197,10 @@ describe('debounce', () => { describe('Test payload', () => { describe('AbortSignal', () => { it('Should abort the test when signal is aborted', async () => { - const control = jest.fn(); + const control = vi.fn(); let run = 0; - const test = jest.fn(async (payload: TestFnPayload) => { + const test = vi.fn(async (payload: TestFnPayload) => { expect(payload.signal.aborted).toBe(false); await wait(50); // We should only abort on the first run because diff --git a/packages/vest/src/exports/__tests__/parser.test.ts b/packages/vest/src/exports/__tests__/parser.test.ts index fbf5fa61a..f288e2c79 100644 --- a/packages/vest/src/exports/__tests__/parser.test.ts +++ b/packages/vest/src/exports/__tests__/parser.test.ts @@ -1,7 +1,9 @@ +import { parse } from 'parser'; +import { describe, it, expect } from 'vitest'; + import * as suiteDummy from '../../testUtils/suiteDummy'; import { ser } from '../../testUtils/suiteDummy'; -import { parse } from 'parser'; import * as vest from 'vest'; describe('parser.parse', () => { diff --git a/packages/vest/src/exports/__tests__/promisify.test.ts b/packages/vest/src/exports/__tests__/promisify.test.ts index 7651940b6..288dd5b5f 100644 --- a/packages/vest/src/exports/__tests__/promisify.test.ts +++ b/packages/vest/src/exports/__tests__/promisify.test.ts @@ -1,22 +1,23 @@ import { faker } from '@faker-js/faker'; +import { TFieldName } from 'SuiteResultTypes'; +import { describe, it, expect, beforeEach, vi } from 'vitest'; import { dummyTest } from '../../testUtils/testDummy'; import { TestPromise } from '../../testUtils/testPromise'; import promisify from '../promisify'; -import { TFieldName } from 'SuiteResultTypes'; import * as vest from 'vest'; describe('Utility: promisify', () => { - let validatorFn: jest.Mock, any>; + let validatorFn: vi.Mock, any>; let validateAsync: ( ...args: any[] ) => Promise>; beforeEach(() => { - validatorFn = jest.fn( + validatorFn = vi.fn( vest.create( - jest.fn(() => { + vi.fn(() => { dummyTest.failing('field_0'); }), ), @@ -34,7 +35,7 @@ describe('Utility: promisify', () => { describe('Return value', () => { it('should be a function', () => { - expect(typeof promisify(jest.fn())).toBe('function'); + expect(typeof promisify(vi.fn())).toBe('function'); }); it('should be a promise', () => diff --git a/packages/vest/src/exports/debounce.ts b/packages/vest/src/exports/debounce.ts index b185d1721..85e82abd2 100644 --- a/packages/vest/src/exports/debounce.ts +++ b/packages/vest/src/exports/debounce.ts @@ -1,8 +1,8 @@ +import { registerReconciler } from 'vest'; import { CB, isPromise, Nullable } from 'vest-utils'; import { Isolate, TIsolate, IsolateSelectors } from 'vestjs-runtime'; import { TestFn, TestFnPayload } from 'TestTypes'; -import { registerReconciler } from 'vest'; const isolateType = 'Debounce'; diff --git a/packages/vest/src/exports/parser.ts b/packages/vest/src/exports/parser.ts index f31e52093..6e344dbe2 100644 --- a/packages/vest/src/exports/parser.ts +++ b/packages/vest/src/exports/parser.ts @@ -1,8 +1,8 @@ +import { suiteSelectors } from 'vest'; import { hasOwnProperty, invariant, isNullish, isPositive } from 'vest-utils'; import { ErrorStrings } from 'ErrorStrings'; import { SuiteSummary, TFieldName, TGroupName } from 'SuiteResultTypes'; -import { suiteSelectors } from 'vest'; export function parse( summary: SuiteSummary, 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 a36650933..803f9c880 100644 --- a/packages/vest/src/hooks/__tests__/__snapshots__/include.test.ts.snap +++ b/packages/vest/src/hooks/__tests__/__snapshots__/include.test.ts.snap @@ -1,6 +1,6 @@ -// Jest Snapshot v1, https://goo.gl/fbAQLP +// Vitest Snapshot v1, https://vitest.dev/guide/snapshot.html -exports[`include Field is excluded via \`skip\` Should disregard \`include.when\` and avoid running the test 1`] = ` +exports[`include > Field is excluded via \`skip\` > Should disregard \`include.when\` and avoid running the test 1`] = ` { "done": [Function], "errorCount": 1, @@ -56,7 +56,7 @@ exports[`include Field is excluded via \`skip\` Should disregard \`include.when\ } `; -exports[`include Field is excluded via \`skip\` Should disregard \`include\` and avoid running the test 1`] = ` +exports[`include > Field is excluded via \`skip\` > Should disregard \`include\` and avoid running the test 1`] = ` { "done": [Function], "errorCount": 1, @@ -112,7 +112,7 @@ exports[`include Field is excluded via \`skip\` Should disregard \`include\` and } `; -exports[`include Test is excluded via \`skip.group\` Should disregard \`include.when\` and avoid running the test 1`] = ` +exports[`include > Test is excluded via \`skip.group\` > Should disregard \`include.when\` and avoid running the test 1`] = ` { "done": [Function], "errorCount": 1, @@ -189,7 +189,7 @@ exports[`include Test is excluded via \`skip.group\` Should disregard \`include. } `; -exports[`include Test is excluded via \`skip.group\` Should disregard \`include\` and avoid running the test 1`] = ` +exports[`include > Test is excluded via \`skip.group\` > Should disregard \`include\` and avoid running the test 1`] = ` { "done": [Function], "errorCount": 1, @@ -266,7 +266,7 @@ exports[`include Test is excluded via \`skip.group\` Should disregard \`include\ } `; -exports[`include Test is excluded via \`skipWhen\` Should disregard \`include.when\` and avoid running the matching tests 1`] = ` +exports[`include > Test is excluded via \`skipWhen\` > Should disregard \`include.when\` and avoid running the matching tests 1`] = ` { "done": [Function], "errorCount": 1, @@ -313,7 +313,7 @@ exports[`include Test is excluded via \`skipWhen\` Should disregard \`include.wh } `; -exports[`include Test is excluded via \`skipWhen\` Should disregard \`include\` and avoid running the matching tests 1`] = ` +exports[`include > Test is excluded via \`skipWhen\` > Should disregard \`include\` and avoid running the matching tests 1`] = ` { "done": [Function], "errorCount": 1, @@ -360,7 +360,7 @@ exports[`include Test is excluded via \`skipWhen\` Should disregard \`include\` } `; -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`] = ` +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, @@ -421,7 +421,7 @@ exports[`include There is an \`onlyd\` field \`include\` is run as-is without mo } `; -exports[`include There is an \`onlyd\` field include().when() \`when\` param is a boolean when \`false\` Should skip run included field 1`] = ` +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, @@ -486,7 +486,7 @@ exports[`include There is an \`onlyd\` field include().when() \`when\` param is } `; -exports[`include There is an \`onlyd\` field include().when() \`when\` param is a boolean when \`true\` Should run included field 1`] = ` +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, @@ -556,7 +556,7 @@ exports[`include There is an \`onlyd\` field include().when() \`when\` param is } `; -exports[`include There is an \`onlyd\` field include().when() \`when\` param is a function Callback evaluation Should evaluate per test run 1`] = ` +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, @@ -608,7 +608,7 @@ exports[`include There is an \`onlyd\` field include().when() \`when\` param is } `; -exports[`include There is an \`onlyd\` field include().when() \`when\` param is a function when returning\`false\` Should skip run included field 1`] = ` +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, @@ -673,7 +673,7 @@ exports[`include There is an \`onlyd\` field include().when() \`when\` param is } `; -exports[`include There is an \`onlyd\` field include().when() \`when\` param is a function when returning \`true\` Should run included field 1`] = ` +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, @@ -743,7 +743,7 @@ exports[`include There is an \`onlyd\` field include().when() \`when\` param is } `; -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`] = ` +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, @@ -808,7 +808,7 @@ exports[`include There is an \`onlyd\` field include().when() \`when\` param is } `; -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`] = ` +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, @@ -873,7 +873,7 @@ exports[`include There is an \`onlyd\` field include().when() \`when\` param is } `; -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`] = ` +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, @@ -943,7 +943,7 @@ exports[`include There is an \`onlyd\` field include().when() \`when\` param is } `; -exports[`include When no \`skip\` or \`only\` include has no effect 1`] = ` +exports[`include > When no \`skip\` or \`only\` > include has no effect 1`] = ` { "done": [Function], "errorCount": 2, @@ -1004,7 +1004,7 @@ exports[`include When no \`skip\` or \`only\` include has no effect 1`] = ` } `; -exports[`include When no \`skip\` or \`only\` include().when has no effect 1`] = ` +exports[`include > When no \`skip\` or \`only\` > include().when has no effect 1`] = ` { "done": [Function], "errorCount": 2, diff --git a/packages/vest/src/hooks/__tests__/include.test.ts b/packages/vest/src/hooks/__tests__/include.test.ts index 951ffd962..d34d1ae30 100644 --- a/packages/vest/src/hooks/__tests__/include.test.ts +++ b/packages/vest/src/hooks/__tests__/include.test.ts @@ -1,13 +1,15 @@ import { Modes } from 'Modes'; +import { describe, it, expect, beforeEach, vi } from 'vitest'; + import * as vest from 'vest'; describe('include', () => { - let cb1 = jest.fn(), - cb2 = jest.fn(); + let cb1 = vi.fn(), + cb2 = vi.fn(); beforeEach(() => { - cb1 = jest.fn(() => false); - cb2 = jest.fn(() => false); + cb1 = vi.fn(() => false); + cb2 = vi.fn(() => false); }); describe('When not passing a string fieldName', () => { @@ -196,7 +198,7 @@ describe('include', () => { describe('Callback evaluation', () => { it('Should run the callback for each matching test', () => { - const cb = jest.fn(() => true); + const cb = vi.fn(() => true); const suite = vest.create(() => { vest.mode(Modes.ALL); vest.only('field_1'); @@ -216,10 +218,10 @@ describe('include', () => { expect(cb).toHaveBeenCalledTimes(2); }); it('Should evaluate per test run', () => { - const cb1 = jest.fn(() => false); - const cb2 = jest.fn(() => false); - const cb3 = jest.fn(() => false); - const cb4 = jest.fn(() => false); + const cb1 = vi.fn(() => false); + const cb2 = vi.fn(() => false); + const cb3 = vi.fn(() => false); + const cb4 = vi.fn(() => false); const suite = vest.create(() => { let shouldRun = false; diff --git a/packages/vest/src/hooks/__tests__/mode.test.ts b/packages/vest/src/hooks/__tests__/mode.test.ts index 6dd6a1472..e36d3a053 100644 --- a/packages/vest/src/hooks/__tests__/mode.test.ts +++ b/packages/vest/src/hooks/__tests__/mode.test.ts @@ -1,4 +1,5 @@ import { TTestSuite } from 'testUtils/TVestMock'; +import { describe, it, expect, beforeEach } from 'vitest'; import wait from 'wait'; import { dummyTest } from '../../testUtils/testDummy'; diff --git a/packages/vest/src/hooks/__tests__/warn.test.ts b/packages/vest/src/hooks/__tests__/warn.test.ts index 523b08ed8..44c9b2922 100644 --- a/packages/vest/src/hooks/__tests__/warn.test.ts +++ b/packages/vest/src/hooks/__tests__/warn.test.ts @@ -1,7 +1,8 @@ import { faker } from '@faker-js/faker'; - import { ErrorStrings } from 'ErrorStrings'; import { VestTest } from 'VestTest'; +import { describe, it, expect, vi } from 'vitest'; + import * as vest from 'vest'; const { create, test, warn } = vest; @@ -22,7 +23,7 @@ describe('warn hook', () => { describe('Error handling', () => { it('Should throw error when currentTest is not present', () => { - const done = jest.fn(); + const done = vi.fn(); create(() => { expect(warn).toThrow(ErrorStrings.WARN_MUST_BE_CALLED_FROM_TEST); done(); 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 8fc8ee4fa..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 @@ -1,6 +1,6 @@ -// Jest Snapshot v1, https://goo.gl/fbAQLP +// Vitest Snapshot v1, https://vitest.dev/guide/snapshot.html -exports[`Top Level Focus Top Level Skip When passing false Should run all fields 1`] = ` +exports[`Top Level Focus > Top Level Skip > When passing false > Should run all fields 1`] = ` Promise { "done": [Function], "dump": [Function], @@ -82,7 +82,7 @@ Promise { } `; -exports[`Top Level Focus Top Level Skip When passing undefined Should run all fields 1`] = ` +exports[`Top Level Focus > Top Level Skip > When passing undefined > Should run all fields 1`] = ` Promise { "done": [Function], "dump": [Function], diff --git a/packages/vest/src/hooks/focused/__tests__/focused.test.ts b/packages/vest/src/hooks/focused/__tests__/focused.test.ts index 41f103ed8..7fd280424 100644 --- a/packages/vest/src/hooks/focused/__tests__/focused.test.ts +++ b/packages/vest/src/hooks/focused/__tests__/focused.test.ts @@ -1,4 +1,5 @@ import { CB } from 'vest-utils'; +import { describe, it, expect } from 'vitest'; import * as vest from 'vest'; diff --git a/packages/vest/src/hooks/optional/__tests__/optional.test.ts b/packages/vest/src/hooks/optional/__tests__/optional.test.ts index f5b722733..b20754f20 100644 --- a/packages/vest/src/hooks/optional/__tests__/optional.test.ts +++ b/packages/vest/src/hooks/optional/__tests__/optional.test.ts @@ -1,10 +1,11 @@ import { TTestSuite } from 'testUtils/TVestMock'; import { BlankValue } from 'vest-utils'; +import { describe, it, expect, beforeEach, vi } from 'vitest'; import wait from 'wait'; import * as vest from 'vest'; -jest.useFakeTimers(); +vi.useFakeTimers(); describe('optional hook', () => { describe('Auto Optional Interface', () => { @@ -126,7 +127,7 @@ describe('optional hook', () => { }); it('Should run the test but omit anyway', () => { - const fn = jest.fn(() => false); + const fn = vi.fn(() => false); const suite = vest.create(() => { vest.optional({ f1: () => true, @@ -201,7 +202,7 @@ describe('optional hook', () => { }); it('Should avoid running the test to begin with', () => { - const fn = jest.fn(); + const fn = vi.fn(); const suite = vest.create(() => { vest.optional({ field_1: true, @@ -394,7 +395,7 @@ describe('optional hook', () => { describe('After the test completed', () => { it('Should be considered as non-valid', () => { const res = suite(); - jest.runAllTimers(); + vi.runAllTimers(); expect(res.isValid()).toBe(false); expect(res.isValid('field_1')).toBe(false); }); @@ -425,7 +426,7 @@ describe('optional hook', () => { describe('After the test completed', () => { it('Should be considered as valid', async () => { suite(); - await jest.runAllTimersAsync(); + await vi.runAllTimersAsync(); expect(suite.isValid()).toBe(true); expect(suite.isValid('field_1')).toBe(true); }); @@ -463,7 +464,7 @@ describe('optional hook', () => { describe('After the test completed', () => { it('Should be considered as valid', async () => { suite(); - await jest.runAllTimersAsync(); + await vi.runAllTimersAsync(); expect(suite.isValid('field_2')).toBe(true); expect(suite.isValid()).toBe(true); expect(suite.isValid('field_1')).toBe(true); 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 b188802e4..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,3 +1,3 @@ -// Jest Snapshot v1, https://goo.gl/fbAQLP +// Vitest Snapshot v1, https://vitest.dev/guide/snapshot.html -exports[`each When callback is not a function should throw 1`] = `"Each must be called with a function"`; +exports[`each > When callback is not a function > should throw 1`] = `[Error: 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 c041fb135..d2b3b45de 100644 --- a/packages/vest/src/isolates/__tests__/__snapshots__/group.test.ts.snap +++ b/packages/vest/src/isolates/__tests__/__snapshots__/group.test.ts.snap @@ -1,6 +1,6 @@ -// Jest Snapshot v1, https://goo.gl/fbAQLP +// Vitest Snapshot v1, https://vitest.dev/guide/snapshot.html -exports[`named group Focus only group only Should skip all tests except \`only\` tests within the group 1`] = ` +exports[`named group > Focus > only > group only > Should skip all tests except \`only\` tests within the group 1`] = ` SuiteSummary { "errorCount": 4, "errors": [ @@ -138,7 +138,7 @@ SuiteSummary { } `; -exports[`named group Focus only top level only should skip all tests except \`only\` tests 1`] = ` +exports[`named group > Focus > only > top level only > should skip all tests except \`only\` tests 1`] = ` SuiteSummary { "errorCount": 3, "errors": [ @@ -271,7 +271,7 @@ SuiteSummary { } `; -exports[`named group Focus skip inside the group should skip only within the group 1`] = ` +exports[`named group > Focus > skip inside the group > should skip only within the group 1`] = ` SuiteSummary { "errorCount": 3, "errors": [ @@ -357,7 +357,7 @@ SuiteSummary { } `; -exports[`named group Focus skip inside the group should skip only within the group, not the next group 1`] = ` +exports[`named group > Focus > skip inside the group > should skip only within the group, not the next group 1`] = ` SuiteSummary { "errorCount": 3, "errors": [ @@ -454,7 +454,7 @@ SuiteSummary { } `; -exports[`named group Focus skip inside the group skip(true) should skip only within the group 1`] = ` +exports[`named group > Focus > skip inside the group > skip(true) > should skip only within the group 1`] = ` SuiteSummary { "errorCount": 5, "errors": [ @@ -579,7 +579,7 @@ SuiteSummary { } `; -exports[`named group Focus skip outside of group Should skip \`skipped\` tests both inside and outside the group 1`] = ` +exports[`named group > Focus > skip outside of group > Should skip \`skipped\` tests both inside and outside the group 1`] = ` SuiteSummary { "errorCount": 1, "errors": [ @@ -655,7 +655,7 @@ SuiteSummary { } `; -exports[`named group Multiple groups Should run the tests within the groups 1`] = ` +exports[`named group > Multiple groups > Should run the tests within the groups 1`] = ` SuiteSummary { "errorCount": 5, "errors": [ @@ -798,7 +798,7 @@ SuiteSummary { } `; -exports[`named group Should run the tests within the group 1`] = ` +exports[`named group > Should run the tests within the group 1`] = ` SuiteSummary { "errorCount": 3, "errors": [ @@ -902,7 +902,7 @@ SuiteSummary { } `; -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": [ @@ -976,7 +976,7 @@ SuiteSummary { } `; -exports[`unnamed groups Should run tests normally 1`] = ` +exports[`unnamed groups > Should run tests normally 1`] = ` SuiteSummary { "errorCount": 3, "errors": [ @@ -1050,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": [], @@ -1108,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": [ @@ -1172,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 67b4a2a16..5fc45e43d 100644 --- a/packages/vest/src/isolates/__tests__/__snapshots__/omitWhen.test.ts.snap +++ b/packages/vest/src/isolates/__tests__/__snapshots__/omitWhen.test.ts.snap @@ -1,6 +1,6 @@ -// Jest Snapshot v1, https://goo.gl/fbAQLP +// Vitest Snapshot v1, https://vitest.dev/guide/snapshot.html -exports[`omitWhen When conditional is falsy boolean conditional Should have all tests within the omit block referenced in the result 1`] = ` +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, @@ -41,7 +41,7 @@ exports[`omitWhen When conditional is falsy boolean conditional Should have all } `; -exports[`omitWhen When conditional is falsy boolean conditional Should run tests normally 1`] = ` +exports[`omitWhen > When conditional is falsy > boolean conditional > Should run tests normally 1`] = ` { "field_1": { "errorCount": 1, @@ -82,7 +82,7 @@ exports[`omitWhen When conditional is falsy boolean conditional Should run tests } `; -exports[`omitWhen When conditional is falsy boolean conditional Should run tests normally 2`] = ` +exports[`omitWhen > When conditional is falsy > boolean conditional > Should run tests normally 2`] = ` { "field_1": { "errorCount": 1, @@ -123,7 +123,7 @@ exports[`omitWhen When conditional is falsy boolean conditional Should run tests } `; -exports[`omitWhen When conditional is falsy function conditional Should have all tests within the omit block referenced in the result 1`] = ` +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, @@ -164,7 +164,7 @@ exports[`omitWhen When conditional is falsy function conditional Should have all } `; -exports[`omitWhen When conditional is falsy function conditional Should run tests normally 1`] = ` +exports[`omitWhen > When conditional is falsy > function conditional > Should run tests normally 1`] = ` { "field_1": { "errorCount": 1, @@ -205,7 +205,7 @@ exports[`omitWhen When conditional is falsy function conditional Should run test } `; -exports[`omitWhen When conditional is falsy function conditional Should run tests normally 2`] = ` +exports[`omitWhen > When conditional is falsy > function conditional > Should run tests normally 2`] = ` { "field_1": { "errorCount": 1, @@ -246,7 +246,7 @@ exports[`omitWhen When conditional is falsy function conditional Should run test } `; -exports[`omitWhen When conditional is truthy boolean conditional Should avoid running the omitted tests 1`] = ` +exports[`omitWhen > When conditional is truthy > boolean conditional > Should avoid running the omitted tests 1`] = ` SuiteSummary { "errorCount": 1, "errors": [ @@ -319,7 +319,7 @@ SuiteSummary { } `; -exports[`omitWhen When conditional is truthy boolean conditional Should skip and not run omitted fields when no filter provided 1`] = ` +exports[`omitWhen > When conditional is truthy > boolean conditional > Should skip and not run omitted fields when no filter provided 1`] = ` SuiteSummary { "errorCount": 1, "errors": [ @@ -392,7 +392,7 @@ SuiteSummary { } `; -exports[`omitWhen When conditional is truthy function conditional Should avoid running the omitted tests 1`] = ` +exports[`omitWhen > When conditional is truthy > function conditional > Should avoid running the omitted tests 1`] = ` SuiteSummary { "errorCount": 1, "errors": [ @@ -465,7 +465,7 @@ SuiteSummary { } `; -exports[`omitWhen When conditional is truthy function conditional Should skip and not run omitted fields when no filter provided 1`] = ` +exports[`omitWhen > When conditional is truthy > function conditional > Should skip and not run omitted fields when no filter provided 1`] = ` SuiteSummary { "errorCount": 1, "errors": [ 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 c21e1ac47..504aabb55 100644 --- a/packages/vest/src/isolates/__tests__/__snapshots__/skipWhen.test.ts.snap +++ b/packages/vest/src/isolates/__tests__/__snapshots__/skipWhen.test.ts.snap @@ -1,6 +1,6 @@ -// Jest Snapshot v1, https://goo.gl/fbAQLP +// Vitest Snapshot v1, https://vitest.dev/guide/snapshot.html -exports[`skipWhen Should pass result draft to the functional condition 1`] = ` +exports[`skipWhen > Should pass result draft to the functional condition 1`] = ` SuiteSummary { "errorCount": 0, "errors": [], @@ -30,7 +30,7 @@ SuiteSummary { } `; -exports[`skipWhen Should pass result draft to the functional condition 2`] = ` +exports[`skipWhen > Should pass result draft to the functional condition 2`] = ` SuiteSummary { "errorCount": 1, "errors": [ @@ -78,7 +78,7 @@ SuiteSummary { } `; -exports[`skipWhen Should pass result draft to the functional condition 3`] = ` +exports[`skipWhen > Should pass result draft to the functional condition 3`] = ` SuiteSummary { "errorCount": 2, "errors": [ diff --git a/packages/vest/src/isolates/__tests__/each.test.ts b/packages/vest/src/isolates/__tests__/each.test.ts index d45994078..d50a9cdab 100644 --- a/packages/vest/src/isolates/__tests__/each.test.ts +++ b/packages/vest/src/isolates/__tests__/each.test.ts @@ -1,14 +1,20 @@ -import { TDeferThrow } from 'vest-utils/src/deferThrow'; - -import { TVestMock } from '../../testUtils/TVestMock'; -import mockThrowError from '../../testUtils/mockThrowError'; +import { deferThrow } from 'vest-utils'; +import { describe, it, expect, vi } from 'vitest'; import * as vest from 'vest'; +vi.mock('vest-utils', async () => { + const vu = await vi.importActual('vest-utils'); + return { + ...vu, + deferThrow: vi.fn(), + }; +}); + describe('each', () => { describe('When callback is not a function', () => { it('should throw', () => { - const control = jest.fn(); + const control = vi.fn(); const suite = vest.create(() => { expect(() => { // @ts-expect-error @@ -23,7 +29,7 @@ describe('each', () => { }); it('Should pass to callback the current list item and index', () => { - const cb = jest.fn(); + const cb = vi.fn(); const suite = vest.create(() => { vest.each([1, 2, 3, 'str'], cb); }); @@ -39,16 +45,6 @@ describe('each', () => { }); describe('Test Reorder', () => { - let deferThrow: TDeferThrow; - let vest: TVestMock; - - beforeEach(() => { - const mock = mockThrowError(); - deferThrow = mock.deferThrow; - - vest = mock.vest; - }); - it('Should allow reorder', () => { const suite = vest.create(() => { vest.each([0, 1], v => { @@ -56,10 +52,9 @@ describe('each', () => { }); }); - suite(); suite(); - expect(deferThrow).toHaveBeenCalledTimes(0); + expect(() => suite()).not.toThrow(); }); describe('Sanity', () => { @@ -76,8 +71,7 @@ describe('each', () => { suite(); suite(); - - expect(deferThrow).toHaveBeenCalledTimes(1); + expect(deferThrow).toHaveBeenCalled(); }); }); }); diff --git a/packages/vest/src/isolates/__tests__/group.test.ts b/packages/vest/src/isolates/__tests__/group.test.ts index dfdbaee75..335ddc7e9 100644 --- a/packages/vest/src/isolates/__tests__/group.test.ts +++ b/packages/vest/src/isolates/__tests__/group.test.ts @@ -1,3 +1,5 @@ +import { describe, it, expect, vi } from 'vitest'; + import * as vest from 'vest'; enum GroupNames { @@ -15,7 +17,7 @@ enum FieldNames { describe('named group', () => { it('should run group callback', () => { const groupName = 'groupName'; - const callback = jest.fn(); + const callback = vi.fn(); vest.create(() => { vest.group(groupName, callback); })(); @@ -23,9 +25,9 @@ describe('named group', () => { }); it('Should run the tests within the group', () => { - const cb1 = jest.fn(() => false); - const cb2 = jest.fn(() => false); - const cb3 = jest.fn(() => {}); + const cb1 = vi.fn(() => false); + const cb2 = vi.fn(() => false); + const cb3 = vi.fn(() => {}); const suite = vest.create(() => { vest.mode(vest.Modes.ALL); vest.test(FieldNames.F1, () => false); @@ -76,9 +78,9 @@ describe('named group', () => { describe('Multiple groups', () => { it('Should run the tests within the groups', () => { - const cb1 = jest.fn(() => false); - const cb2 = jest.fn(() => false); - const cb3 = jest.fn(() => {}); + const cb1 = vi.fn(() => false); + const cb2 = vi.fn(() => false); + const cb3 = vi.fn(() => {}); const suite = vest.create(() => { vest.mode(vest.Modes.ALL); vest.test(FieldNames.F1, () => false); @@ -146,8 +148,8 @@ describe('named group', () => { describe('Focus', () => { describe('skip outside of group', () => { it('Should skip `skipped` tests both inside and outside the group', () => { - const cb1 = jest.fn(() => false); - const cb2 = jest.fn(() => false); + const cb1 = vi.fn(() => false); + const cb2 = vi.fn(() => false); const suite = vest.create(() => { vest.mode(vest.Modes.ALL); @@ -178,9 +180,9 @@ describe('named group', () => { describe('skip inside the group', () => { it('should skip only within the group', () => { - const cb1 = jest.fn(() => false); - const cb2 = jest.fn(() => false); - const cb3 = jest.fn(() => false); + const cb1 = vi.fn(() => false); + const cb2 = vi.fn(() => false); + const cb3 = vi.fn(() => false); const suite = vest.create(() => { vest.mode(vest.Modes.ALL); @@ -210,9 +212,9 @@ describe('named group', () => { }); it('should skip only within the group, not the next group', () => { - const cb1 = jest.fn(() => false); - const cb2 = jest.fn(() => false); - const cb3 = jest.fn(() => false); + const cb1 = vi.fn(() => false); + const cb2 = vi.fn(() => false); + const cb3 = vi.fn(() => false); const suite = vest.create(() => { vest.mode(vest.Modes.ALL); @@ -248,9 +250,9 @@ describe('named group', () => { describe('skip(true)', () => { it('should skip only within the group', () => { - const cb1 = jest.fn(() => false); - const cb2 = jest.fn(() => false); - const cb3 = jest.fn(() => false); + const cb1 = vi.fn(() => false); + const cb2 = vi.fn(() => false); + const cb3 = vi.fn(() => false); const suite = vest.create(() => { vest.mode(vest.Modes.ALL); @@ -297,10 +299,10 @@ describe('named group', () => { describe('only', () => { describe('top level only', () => { it('should skip all tests except `only` tests', () => { - const cb1 = jest.fn(() => false); - const cb2 = jest.fn(() => false); - const cb3 = jest.fn(() => false); - const cb4 = jest.fn(() => false); + const cb1 = vi.fn(() => false); + const cb2 = vi.fn(() => false); + const cb3 = vi.fn(() => false); + const cb4 = vi.fn(() => false); const suite = vest.create(() => { vest.mode(vest.Modes.ALL); @@ -353,9 +355,9 @@ describe('named group', () => { describe('group only', () => { it('Should skip all tests except `only` tests within the group', () => { - const cb1 = jest.fn(() => false); - const cb2 = jest.fn(() => false); - const cb3 = jest.fn(() => false); + const cb1 = vi.fn(() => false); + const cb2 = vi.fn(() => false); + const cb3 = vi.fn(() => false); const suite = vest.create(() => { vest.mode(vest.Modes.ALL); @@ -406,9 +408,9 @@ describe('named group', () => { describe('unnamed groups', () => { it('Should run tests normally', () => { - const cb1 = jest.fn(() => false); - const cb2 = jest.fn(() => false); - const cb3 = jest.fn(() => false); + const cb1 = vi.fn(() => false); + const cb2 = vi.fn(() => false); + const cb3 = vi.fn(() => false); const suite = vest.create(() => { vest.mode(vest.Modes.ALL); @@ -448,9 +450,9 @@ describe('unnamed groups', () => { describe('with only', () => { it('Should only run the tests specified by only', () => { - const cb1 = jest.fn(() => false); - const cb2 = jest.fn(() => false); - const cb3 = jest.fn(() => false); + const cb1 = vi.fn(() => false); + const cb2 = vi.fn(() => false); + const cb3 = vi.fn(() => false); const suite = vest.create(() => { vest.mode(vest.Modes.ALL); @@ -478,9 +480,9 @@ describe('unnamed groups', () => { describe('with skip', () => { it('Should skip the tests specified by skip', () => { - const cb1 = jest.fn(() => false); - const cb2 = jest.fn(() => false); - const cb3 = jest.fn(() => false); + const cb1 = vi.fn(() => false); + const cb2 = vi.fn(() => false); + const cb3 = vi.fn(() => false); const suite = vest.create(() => { vest.mode(vest.Modes.ALL); @@ -508,9 +510,9 @@ describe('unnamed groups', () => { describe('With skip(true)', () => { it('Should skip all tests in group', () => { - const cb1 = jest.fn(() => false); - const cb2 = jest.fn(() => false); - const cb3 = jest.fn(() => false); + const cb1 = vi.fn(() => false); + const cb2 = vi.fn(() => false); + const cb3 = vi.fn(() => false); const suite = vest.create(() => { vest.mode(vest.Modes.ALL); diff --git a/packages/vest/src/isolates/__tests__/omitWhen.test.ts b/packages/vest/src/isolates/__tests__/omitWhen.test.ts index 2ef0603f2..fd47813a3 100644 --- a/packages/vest/src/isolates/__tests__/omitWhen.test.ts +++ b/packages/vest/src/isolates/__tests__/omitWhen.test.ts @@ -1,24 +1,25 @@ +import { TTestSuite } from 'testUtils/TVestMock'; import { Maybe } from 'vest-utils'; +import { describe, it, expect, beforeEach, vi, afterEach } from 'vitest'; -import { TTestSuite } from 'testUtils/TVestMock'; import * as vest from 'vest'; import { omitWhen, only } from 'vest'; describe('omitWhen', () => { let suite: TTestSuite; - let cb1 = jest.fn(), - cb2 = jest.fn(), - cb3 = jest.fn(), - cb4 = jest.fn(), - cb5 = jest.fn(), + let cb1 = vi.fn(), + cb2 = vi.fn(), + cb3 = vi.fn(), + cb4 = vi.fn(), + cb5 = vi.fn(), allFieldsPass: Maybe; beforeEach(() => { - cb1 = jest.fn(); - cb2 = jest.fn(() => (allFieldsPass ? undefined : false)); - cb3 = jest.fn(() => (allFieldsPass ? undefined : false)); - cb4 = jest.fn(() => (allFieldsPass ? undefined : false)); - cb5 = jest.fn(); + cb1 = vi.fn(); + cb2 = vi.fn(() => (allFieldsPass ? undefined : false)); + cb3 = vi.fn(() => (allFieldsPass ? undefined : false)); + cb4 = vi.fn(() => (allFieldsPass ? undefined : false)); + cb5 = vi.fn(); suite = vest.create((omitConditional, currentField) => { only(currentField); diff --git a/packages/vest/src/isolates/__tests__/skipWhen.test.ts b/packages/vest/src/isolates/__tests__/skipWhen.test.ts index 66c032ab6..e7c1fdd88 100644 --- a/packages/vest/src/isolates/__tests__/skipWhen.test.ts +++ b/packages/vest/src/isolates/__tests__/skipWhen.test.ts @@ -1,13 +1,14 @@ import { TTestSuite } from 'testUtils/TVestMock'; +import { describe, it, expect, beforeEach, vi } from 'vitest'; import { dummyTest } from '../../testUtils/testDummy'; import * as vest from 'vest'; describe('skipWhen', () => { - let fn = jest.fn(); + let fn = vi.fn(); beforeEach(() => { - fn = jest.fn(); + fn = vi.fn(); suite.reset(); }); it('Should run callback both when condition is true or false', () => { @@ -38,8 +39,8 @@ describe('skipWhen', () => { }); it('Should pass result draft to the functional condition', () => { - const f = jest.fn(); - const control = jest.fn(); + const f = vi.fn(); + const control = vi.fn(); vest.create(() => { vest.skipWhen(draft => { 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 307b90d1a..b7515cb25 100644 --- a/packages/vest/src/suite/__tests__/__snapshots__/create.test.ts.snap +++ b/packages/vest/src/suite/__tests__/__snapshots__/create.test.ts.snap @@ -1,6 +1,6 @@ -// Jest Snapshot v1, https://goo.gl/fbAQLP +// Vitest Snapshot v1, https://vitest.dev/guide/snapshot.html -exports[`Test createSuite module Initial run Should be able to get the suite from the result of createSuite 1`] = ` +exports[`Test createSuite module > Initial run > Should be able to get the suite from the result of createSuite 1`] = ` SuiteSummary { "errorCount": 0, "errors": [], @@ -30,7 +30,7 @@ SuiteSummary { } `; -exports[`Test createSuite module Initial run Should initialize with an empty result object 1`] = ` +exports[`Test createSuite module > Initial run > Should initialize with an empty result object 1`] = ` SuiteSummary { "errorCount": 0, "errors": [], @@ -60,7 +60,7 @@ SuiteSummary { } `; -exports[`Test createSuite module Test suite Arguments allows omitting suite name 1`] = ` +exports[`Test createSuite module > Test suite Arguments > allows omitting suite name 1`] = ` SuiteSummary { "errorCount": 0, "errors": [], 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 b97c65e55..e7b2b14c1 100644 --- a/packages/vest/src/suite/__tests__/__snapshots__/staticSuite.test.ts.snap +++ b/packages/vest/src/suite/__tests__/__snapshots__/staticSuite.test.ts.snap @@ -1,6 +1,6 @@ -// Jest Snapshot v1, https://goo.gl/fbAQLP +// Vitest Snapshot v1, https://vitest.dev/guide/snapshot.html -exports[`staticSuite dump should output a dump of the suite 1`] = ` +exports[`staticSuite > dump > should output a dump of the suite 1`] = ` { "$type": "Suite", "abortController": AbortController {}, diff --git a/packages/vest/src/suite/__tests__/create.test.ts b/packages/vest/src/suite/__tests__/create.test.ts index 71e861a72..7148ca2dd 100644 --- a/packages/vest/src/suite/__tests__/create.test.ts +++ b/packages/vest/src/suite/__tests__/create.test.ts @@ -1,20 +1,21 @@ import { faker } from '@faker-js/faker'; +import { ErrorStrings } from 'ErrorStrings'; import { noop } from 'lodash'; +import { describe, it, expect, vi } from 'vitest'; import { dummyTest } from '../../testUtils/testDummy'; import { TestPromise } from '../../testUtils/testPromise'; -import { ErrorStrings } from 'ErrorStrings'; import { create } from 'vest'; describe('Test createSuite module', () => { describe('Test suite Arguments', () => { it('allows omitting suite name', () => { - expect(typeof create(jest.fn())).toBe('function'); - expect(typeof create(jest.fn()).get).toBe('function'); - expect(typeof create(jest.fn()).reset).toBe('function'); - expect(typeof create(jest.fn()).remove).toBe('function'); - expect(create(jest.fn()).get()).toMatchSnapshot(); + expect(typeof create(vi.fn())).toBe('function'); + expect(typeof create(vi.fn()).get).toBe('function'); + expect(typeof create(vi.fn()).reset).toBe('function'); + expect(typeof create(vi.fn()).remove).toBe('function'); + expect(create(vi.fn()).get()).toMatchSnapshot(); }); it.each([faker.lorem.word(), null, undefined, 0, 1, true, false, NaN, ''])( @@ -52,7 +53,7 @@ describe('Test createSuite module', () => { })); it('Passes all arguments over to tests callback', () => { - const testsCallback = jest.fn(); + const testsCallback = vi.fn(); const params = [ 1, 2, @@ -68,7 +69,7 @@ describe('Test createSuite module', () => { }); describe('Initial run', () => { - const testsCb = jest.fn(); + const testsCb = vi.fn(); const genValidate = () => create(testsCb); it('Should initialize with an empty result object', () => { @@ -84,7 +85,7 @@ describe('Test createSuite module', () => { }); it('Should be able to get the suite from the result of createSuite', () => { - const testsCb = jest.fn(); + const testsCb = vi.fn(); expect(create(testsCb).get()).toMatchSnapshot(); }); diff --git a/packages/vest/src/suite/__tests__/remove.test.ts b/packages/vest/src/suite/__tests__/remove.test.ts index aada25460..5a4ded20f 100644 --- a/packages/vest/src/suite/__tests__/remove.test.ts +++ b/packages/vest/src/suite/__tests__/remove.test.ts @@ -1,4 +1,5 @@ import { Modes } from 'Modes'; +import { describe, it, expect } from 'vitest'; import wait from 'wait'; import { dummyTest } from '../../testUtils/testDummy'; diff --git a/packages/vest/src/suite/__tests__/resetField.test.ts b/packages/vest/src/suite/__tests__/resetField.test.ts index 01f957740..6a4063158 100644 --- a/packages/vest/src/suite/__tests__/resetField.test.ts +++ b/packages/vest/src/suite/__tests__/resetField.test.ts @@ -1,4 +1,6 @@ import { TTestSuite } from 'testUtils/TVestMock'; +import { describe, it, expect, beforeEach } from 'vitest'; + import { create, test } from 'vest'; describe('suite.resetField', () => { diff --git a/packages/vest/src/suite/__tests__/staticSuite.test.ts b/packages/vest/src/suite/__tests__/staticSuite.test.ts index 6d8696498..29bf919ee 100644 --- a/packages/vest/src/suite/__tests__/staticSuite.test.ts +++ b/packages/vest/src/suite/__tests__/staticSuite.test.ts @@ -1,7 +1,8 @@ -import wait from 'wait'; - import { SuiteSerializer } from 'SuiteSerializer'; import { VestIsolateType } from 'VestIsolateType'; +import { describe, it, expect } from 'vitest'; +import wait from 'wait'; + import * as vest from 'vest'; import { staticSuite } from 'vest'; diff --git a/packages/vest/src/suite/__tests__/subscribe.test.ts b/packages/vest/src/suite/__tests__/subscribe.test.ts index a463fe71c..6bcd52e50 100644 --- a/packages/vest/src/suite/__tests__/subscribe.test.ts +++ b/packages/vest/src/suite/__tests__/subscribe.test.ts @@ -1,7 +1,8 @@ +import { SuiteSerializer } from 'SuiteSerializer'; import { enforce } from 'n4s'; +import { describe, it, expect, vi } from 'vitest'; import wait from 'wait'; -import { SuiteSerializer } from 'SuiteSerializer'; import * as vest from 'vest'; describe('suite.subscribe', () => { @@ -12,7 +13,7 @@ describe('suite.subscribe', () => { }); it('Should call the callback on suite updates', async () => { - const cb = jest.fn(() => { + const cb = vi.fn(() => { dumps.push(SuiteSerializer.serialize(suite)); }); let callCount = cb.mock.calls.length; @@ -53,7 +54,7 @@ describe('suite.subscribe', () => { describe('unsubscribe', () => { it('Should unsubscribe future events', () => { - const cb = jest.fn(); + const cb = vi.fn(); const suite = vest.create('suite', () => { vest.test('field', () => {}); }); diff --git a/packages/vest/src/suite/__tests__/suiteSelectorsOnSuite.test.ts b/packages/vest/src/suite/__tests__/suiteSelectorsOnSuite.test.ts index 7fa355a3c..87b6e3800 100644 --- a/packages/vest/src/suite/__tests__/suiteSelectorsOnSuite.test.ts +++ b/packages/vest/src/suite/__tests__/suiteSelectorsOnSuite.test.ts @@ -1,4 +1,6 @@ import { TTestSuite } from 'testUtils/TVestMock'; +import { describe, test, expect, beforeEach } from 'vitest'; + import * as vest from 'vest'; describe('Suite Selectors on Suite', () => { @@ -33,7 +35,6 @@ describe('Suite Selectors on Suite', () => { // @ts-ignore if (typeof res[key] === 'function') { // @ts-ignore - // eslint-disable-next-line jest/no-conditional-expect expect(typeof suite[key]).toBe('function'); count++; } @@ -48,7 +49,6 @@ describe('Suite Selectors on Suite', () => { // @ts-ignore if (typeof res[key] === 'function') { // @ts-ignore - // eslint-disable-next-line jest/no-conditional-expect expect(suite[key]()).toEqual(res[key]()); count++; } diff --git a/packages/vest/src/suite/__tests__/typedSuite.test.ts b/packages/vest/src/suite/__tests__/typedSuite.test.ts index 8ee47aa65..d2e84daef 100644 --- a/packages/vest/src/suite/__tests__/typedSuite.test.ts +++ b/packages/vest/src/suite/__tests__/typedSuite.test.ts @@ -1,3 +1,5 @@ +import { describe, it, expect, beforeEach } from 'vitest'; + import * as vest from 'vest'; type TestFields = 'F1' | 'F2' | 'F3'; 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 7f8fc6e26..784f43cc2 100644 --- a/packages/vest/src/suiteResult/__tests__/__snapshots__/useProduceSuiteSummary.test.ts.snap +++ b/packages/vest/src/suiteResult/__tests__/__snapshots__/useProduceSuiteSummary.test.ts.snap @@ -1,6 +1,6 @@ -// Jest Snapshot v1, https://goo.gl/fbAQLP +// Vitest Snapshot v1, https://vitest.dev/guide/snapshot.html -exports[`suite() exposed methods Should have all exposed methods 1`] = ` +exports[`suite() > exposed methods > Should have all exposed methods 1`] = ` { "done": [Function], "errorCount": 0, @@ -31,7 +31,7 @@ exports[`suite() exposed methods Should have all exposed methods 1`] = ` } `; -exports[`suite.get() exposed methods Should have all exposed methods 1`] = ` +exports[`suite.get() > exposed methods > Should have all exposed methods 1`] = ` SuiteSummary { "errorCount": 0, "errors": [], diff --git a/packages/vest/src/suiteResult/__tests__/useProduceSuiteSummary.test.ts b/packages/vest/src/suiteResult/__tests__/useProduceSuiteSummary.test.ts index 8d50c2e96..bb6c3cefa 100644 --- a/packages/vest/src/suiteResult/__tests__/useProduceSuiteSummary.test.ts +++ b/packages/vest/src/suiteResult/__tests__/useProduceSuiteSummary.test.ts @@ -1,9 +1,10 @@ +import { Modes } from 'Modes'; +import { describe, it, expect } from 'vitest'; import wait from 'wait'; import { ser } from '../../testUtils/suiteDummy'; import { dummyTest } from '../../testUtils/testDummy'; -import { Modes } from 'Modes'; import * as vest from 'vest'; describe('useProduceSuiteSummary', () => { diff --git a/packages/vest/src/suiteResult/done/__tests__/done.test.ts b/packages/vest/src/suiteResult/done/__tests__/done.test.ts index fa0edf7b7..fcb06248f 100644 --- a/packages/vest/src/suiteResult/done/__tests__/done.test.ts +++ b/packages/vest/src/suiteResult/done/__tests__/done.test.ts @@ -1,3 +1,4 @@ +import { describe, it, expect, vi } from 'vitest'; import wait from 'wait'; import { dummyTest } from '../../../testUtils/testDummy'; @@ -17,8 +18,8 @@ describe('done', () => { dummyTest.failingWarning('field_2'); })(); - const doneCallback = jest.fn(); - const fieldDoneCallback = jest.fn(); + const doneCallback = vi.fn(); + const fieldDoneCallback = vi.fn(); result.done(doneCallback).done('field_2', fieldDoneCallback); @@ -34,10 +35,10 @@ describe('done', () => { test.push(dummyTest.failingAsync('test', { time: 100 })); }); - const doneCallback1 = jest.fn(); - const fieldDoneCallback1 = jest.fn(); - const doneCallback2 = jest.fn(); - const fieldDoneCallback2 = jest.fn(); + const doneCallback1 = vi.fn(); + const fieldDoneCallback1 = vi.fn(); + const doneCallback2 = vi.fn(); + const fieldDoneCallback2 = vi.fn(); suite().done(doneCallback1).done('test', fieldDoneCallback1); await wait(10); @@ -53,11 +54,11 @@ describe('done', () => { describe('When there are async tests', () => { describe('When field name is not passed', () => { it('Should run the done callback after all the fields finished running', () => { - const check1 = jest.fn(); - const check2 = jest.fn(); - const check3 = jest.fn(); + const check1 = vi.fn(); + const check2 = vi.fn(); + const check3 = vi.fn(); return TestPromise(done => { - const doneCallback = jest.fn(() => { + const doneCallback = vi.fn(() => { expect(check1).toHaveBeenCalled(); expect(check2).toHaveBeenCalled(); expect(check3).toHaveBeenCalled(); @@ -289,8 +290,8 @@ describe('done', () => { describe('When suite re-runs and a pending test is now skipped', () => { it('Should immediately call the second done callback, omit the first', async () => { - const done_0 = jest.fn(); - const done_1 = jest.fn(); + const done_0 = vi.fn(); + const done_1 = vi.fn(); const suite = vest.create(username => { vest.test('username', () => { @@ -320,7 +321,7 @@ describe('done', () => { describe('Passing a field that does not exist', () => { it('Should avoid calling the callback', () => { - const cb = jest.fn(); + const cb = vi.fn(); const suite = vest.create(() => { vest.test('test', () => {}); @@ -334,7 +335,7 @@ describe('done', () => { describe('When no tests are run', () => { it('Should run the callback', () => { - const cb = jest.fn(); + const cb = vi.fn(); const suite = vest.create(() => {}); @@ -345,7 +346,7 @@ describe('done', () => { describe('When tests are omitted', () => { it('Should run the callback', () => { - const cb = jest.fn(); + const cb = vi.fn(); const suite = vest.create(() => { vest.optional({ f1: true }); @@ -362,7 +363,7 @@ describe('done', () => { describe('When focused done call does not match executed tests', () => { it('Should not call the callback', () => { - const cb = jest.fn(); + const cb = vi.fn(); const suite = vest.create(() => { vest.test('test', () => false); @@ -377,7 +378,7 @@ describe('done', () => { describe('Async Isolate', () => { describe('When async isolate is pending', () => { it('Should not call the callback', () => { - const cb = jest.fn(); + const cb = vi.fn(); const suite = vest.create(() => { vest.test('test', () => false); @@ -395,7 +396,7 @@ describe('done', () => { describe('When async isolate is completed', () => { it('Should call the callback', async () => { - const cb = jest.fn(); + const cb = vi.fn(); const suite = vest.create(() => { vest.test('test', () => false); 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 ba439ad5c..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 @@ -1,6 +1,6 @@ -// Jest Snapshot v1, https://goo.gl/fbAQLP +// Vitest Snapshot v1, https://vitest.dev/guide/snapshot.html -exports[`collectFailureMessages getErrors When no options passed should match snapshot 1`] = ` +exports[`collectFailureMessages > getErrors > When no options passed > should match snapshot 1`] = ` { "field_1": [ "field_1_failure message 2", @@ -13,23 +13,23 @@ exports[`collectFailureMessages getErrors When no options passed should match sn } `; -exports[`collectFailureMessages getErrors When specific field requested Should match snapshot 1`] = ` +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`] = ` +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 > getErrors > When specific field requested > Should match snapshot 3`] = `[]`; -exports[`collectFailureMessages getErrorsByGroup Should match snapshot 1`] = ` +exports[`collectFailureMessages > getErrorsByGroup > Should match snapshot 1`] = ` { "field_1": [], "field_2": [ @@ -39,18 +39,18 @@ exports[`collectFailureMessages getErrorsByGroup Should match snapshot 1`] = ` } `; -exports[`collectFailureMessages getErrorsByGroup with field name Should match snapshot 1`] = `[]`; +exports[`collectFailureMessages > getErrorsByGroup > with field name > Should match snapshot 1`] = `[]`; -exports[`collectFailureMessages getErrorsByGroup with field name Should match snapshot 2`] = ` +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 > getErrorsByGroup > with field name > Should match snapshot 3`] = `[]`; -exports[`collectFailureMessages getWarnings When no options passed should match snapshot 1`] = ` +exports[`collectFailureMessages > getWarnings > When no options passed > should match snapshot 1`] = ` { "field_2": [ "field_2_warning message 3", @@ -59,18 +59,18 @@ exports[`collectFailureMessages getWarnings When no options passed should match } `; -exports[`collectFailureMessages getWarnings When specific field requested Should match snapshot 1`] = `[]`; +exports[`collectFailureMessages > getWarnings > When specific field requested > Should match snapshot 1`] = `[]`; -exports[`collectFailureMessages getWarnings When specific field requested Should match snapshot 2`] = ` +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 > getWarnings > When specific field requested > Should match snapshot 3`] = `[]`; -exports[`collectFailureMessages getWarningsByGroup Should match snapshot 1`] = ` +exports[`collectFailureMessages > getWarningsByGroup > Should match snapshot 1`] = ` { "field_2": [ "field_2_warning message 3", @@ -78,12 +78,12 @@ exports[`collectFailureMessages getWarningsByGroup Should match snapshot 1`] = ` } `; -exports[`collectFailureMessages getWarningsByGroup with field name Should match snapshot 1`] = `[]`; +exports[`collectFailureMessages > getWarningsByGroup > with field name > Should match snapshot 1`] = `[]`; -exports[`collectFailureMessages getWarningsByGroup with field name Should match snapshot 2`] = ` +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`] = `[]`; +exports[`collectFailureMessages > getWarningsByGroup > with field name > Should match snapshot 3`] = `[]`; diff --git a/packages/vest/src/suiteResult/selectors/__tests__/collectFailureMessages.test.ts b/packages/vest/src/suiteResult/selectors/__tests__/collectFailureMessages.test.ts index 78bb8d2a5..7f0602876 100644 --- a/packages/vest/src/suiteResult/selectors/__tests__/collectFailureMessages.test.ts +++ b/packages/vest/src/suiteResult/selectors/__tests__/collectFailureMessages.test.ts @@ -1,4 +1,5 @@ import { TTestSuite } from 'testUtils/TVestMock'; +import { describe, it, expect, beforeEach, test } from 'vitest'; import { dummyTest } from '../../../testUtils/testDummy'; diff --git a/packages/vest/src/suiteResult/selectors/__tests__/getFailure.test.ts b/packages/vest/src/suiteResult/selectors/__tests__/getFailure.test.ts index 48c9a90fc..faeeb9899 100644 --- a/packages/vest/src/suiteResult/selectors/__tests__/getFailure.test.ts +++ b/packages/vest/src/suiteResult/selectors/__tests__/getFailure.test.ts @@ -1,3 +1,5 @@ +import { describe, it, expect } from 'vitest'; + import * as vest from 'vest'; describe('->getFailure (singular form)', () => { diff --git a/packages/vest/src/suiteResult/selectors/__tests__/getFailures.test.ts b/packages/vest/src/suiteResult/selectors/__tests__/getFailures.test.ts index 4fc566d9d..b6e75039d 100644 --- a/packages/vest/src/suiteResult/selectors/__tests__/getFailures.test.ts +++ b/packages/vest/src/suiteResult/selectors/__tests__/getFailures.test.ts @@ -1,6 +1,8 @@ +import { Modes } from 'Modes'; +import { describe, it, expect } from 'vitest'; + import { dummyTest } from '../../../testUtils/testDummy'; -import { Modes } from 'Modes'; import * as vest from 'vest'; describe('->getFailures', () => { diff --git a/packages/vest/src/suiteResult/selectors/__tests__/getFailuresByGroup.test.ts b/packages/vest/src/suiteResult/selectors/__tests__/getFailuresByGroup.test.ts index d540edf58..7ef59c4eb 100644 --- a/packages/vest/src/suiteResult/selectors/__tests__/getFailuresByGroup.test.ts +++ b/packages/vest/src/suiteResult/selectors/__tests__/getFailuresByGroup.test.ts @@ -1,8 +1,9 @@ +import { Modes } from 'Modes'; import { TTestSuite } from 'testUtils/TVestMock'; +import { describe, it, expect, beforeEach } from 'vitest'; import { dummyTest } from '../../../testUtils/testDummy'; -import { Modes } from 'Modes'; import { create, group } from 'vest'; import * as vest from 'vest'; diff --git a/packages/vest/src/suiteResult/selectors/__tests__/hasFailures.test.ts b/packages/vest/src/suiteResult/selectors/__tests__/hasFailures.test.ts index 99def221c..b485d3b29 100644 --- a/packages/vest/src/suiteResult/selectors/__tests__/hasFailures.test.ts +++ b/packages/vest/src/suiteResult/selectors/__tests__/hasFailures.test.ts @@ -1,4 +1,5 @@ import { faker } from '@faker-js/faker'; +import { describe, it, expect } from 'vitest'; import { dummyTest } from '../../../testUtils/testDummy'; diff --git a/packages/vest/src/suiteResult/selectors/__tests__/hasFailuresByGroup.test.ts b/packages/vest/src/suiteResult/selectors/__tests__/hasFailuresByGroup.test.ts index ef5b2efa4..ffb1e1e60 100644 --- a/packages/vest/src/suiteResult/selectors/__tests__/hasFailuresByGroup.test.ts +++ b/packages/vest/src/suiteResult/selectors/__tests__/hasFailuresByGroup.test.ts @@ -1,8 +1,9 @@ import { faker } from '@faker-js/faker'; +import { TTestSuite } from 'testUtils/TVestMock'; +import { describe, it, expect } from 'vitest'; import { dummyTest } from '../../../testUtils/testDummy'; -import { TTestSuite } from 'testUtils/TVestMock'; import * as vest from 'vest'; const fieldName = faker.lorem.word(); diff --git a/packages/vest/src/suiteResult/selectors/__tests__/hasFailuresByTestObject.test.ts b/packages/vest/src/suiteResult/selectors/__tests__/hasFailuresByTestObject.test.ts index 7d261210c..9cec3c01e 100644 --- a/packages/vest/src/suiteResult/selectors/__tests__/hasFailuresByTestObject.test.ts +++ b/packages/vest/src/suiteResult/selectors/__tests__/hasFailuresByTestObject.test.ts @@ -1,10 +1,10 @@ import { faker } from '@faker-js/faker'; - import { TIsolateTest } from 'IsolateTest'; import { Severity } from 'Severity'; import { VestTest } from 'VestTest'; import { hasFailuresByTestObject } from 'hasFailuresByTestObjects'; import { mockIsolateTest } from 'vestMocks'; +import { describe, it, expect, beforeEach } from 'vitest'; const fieldName: string = faker.lorem.word(); diff --git a/packages/vest/src/suiteResult/selectors/__tests__/isPending.test.ts b/packages/vest/src/suiteResult/selectors/__tests__/isPending.test.ts index 3e60bfa88..159993e83 100644 --- a/packages/vest/src/suiteResult/selectors/__tests__/isPending.test.ts +++ b/packages/vest/src/suiteResult/selectors/__tests__/isPending.test.ts @@ -1,3 +1,4 @@ +import { describe, it, expect } from 'vitest'; import wait from 'wait'; import * as vest from 'vest'; diff --git a/packages/vest/src/suiteResult/selectors/__tests__/isTested.test.ts b/packages/vest/src/suiteResult/selectors/__tests__/isTested.test.ts index 32543cf06..da7b88ca4 100644 --- a/packages/vest/src/suiteResult/selectors/__tests__/isTested.test.ts +++ b/packages/vest/src/suiteResult/selectors/__tests__/isTested.test.ts @@ -1,3 +1,4 @@ +import { describe, it, expect } from 'vitest'; import wait from 'wait'; import * as vest from 'vest'; diff --git a/packages/vest/src/suiteResult/selectors/__tests__/isValid.test.ts b/packages/vest/src/suiteResult/selectors/__tests__/isValid.test.ts index c5e4a5c7a..b3d1408d2 100644 --- a/packages/vest/src/suiteResult/selectors/__tests__/isValid.test.ts +++ b/packages/vest/src/suiteResult/selectors/__tests__/isValid.test.ts @@ -1,4 +1,5 @@ import { TTestSuite } from 'testUtils/TVestMock'; +import { describe, it, expect, beforeEach } from 'vitest'; import wait from 'wait'; import { TestPromise } from '../../../testUtils/testPromise'; diff --git a/packages/vest/src/suiteResult/selectors/__tests__/isValidByGroup.test.ts b/packages/vest/src/suiteResult/selectors/__tests__/isValidByGroup.test.ts index ac88b0bd9..a988a024e 100644 --- a/packages/vest/src/suiteResult/selectors/__tests__/isValidByGroup.test.ts +++ b/packages/vest/src/suiteResult/selectors/__tests__/isValidByGroup.test.ts @@ -1,9 +1,10 @@ +import { Modes } from 'Modes'; +import { TTestSuite } from 'testUtils/TVestMock'; +import { describe, it, expect, beforeEach } from 'vitest'; import wait from 'wait'; import { TestPromise } from '../../../testUtils/testPromise'; -import { Modes } from 'Modes'; -import { TTestSuite } from 'testUtils/TVestMock'; import { test, optional, diff --git a/packages/vest/src/suiteResult/selectors/__tests__/summaryFailures.test.ts b/packages/vest/src/suiteResult/selectors/__tests__/summaryFailures.test.ts index 1d2e1199d..b7cc72bcb 100644 --- a/packages/vest/src/suiteResult/selectors/__tests__/summaryFailures.test.ts +++ b/packages/vest/src/suiteResult/selectors/__tests__/summaryFailures.test.ts @@ -1,4 +1,5 @@ import { TTestSuite } from 'testUtils/TVestMock'; +import { describe, test, expect, beforeEach } from 'vitest'; import * as vest from 'vest'; diff --git a/packages/vest/src/testUtils/__tests__/partition.test.ts b/packages/vest/src/testUtils/__tests__/partition.test.ts index dc0feef85..3da3b447c 100644 --- a/packages/vest/src/testUtils/__tests__/partition.test.ts +++ b/packages/vest/src/testUtils/__tests__/partition.test.ts @@ -1,3 +1,5 @@ +import { describe, it, expect } from 'vitest'; + import partition from '../partition'; describe('partition', () => { diff --git a/packages/vest/src/testUtils/mockThrowError.ts b/packages/vest/src/testUtils/mockThrowError.ts deleted file mode 100644 index 208a974ed..000000000 --- a/packages/vest/src/testUtils/mockThrowError.ts +++ /dev/null @@ -1,16 +0,0 @@ -import { TVestMock } from './TVestMock'; - -export default function mockThrowError() { - const deferThrow = jest.fn(); - jest.resetModules(); - jest.mock('vest-utils', () => ({ - ...jest.requireActual('vest-utils'), - deferThrow, - })); - const vest = require('vest') as TVestMock; - - return { - deferThrow, - vest, - }; -} diff --git a/packages/vest/src/testUtils/testDummy.ts b/packages/vest/src/testUtils/testDummy.ts index fa018acaa..2b57759a0 100644 --- a/packages/vest/src/testUtils/testDummy.ts +++ b/packages/vest/src/testUtils/testDummy.ts @@ -1,5 +1,5 @@ -/* eslint-disable jest/valid-title */ import { faker } from '@faker-js/faker'; +import { vi } from 'vitest'; import { test as vestTest, warn } from 'vest'; @@ -15,7 +15,7 @@ const testDummy = () => { const to = vestTest( name, message, - jest.fn(() => { + vi.fn(() => { throw new Error(); }), ); @@ -30,7 +30,7 @@ const testDummy = () => { const to = vestTest( name, message, - jest.fn(() => { + vi.fn(() => { warn(); throw new Error(); }), @@ -43,7 +43,7 @@ const testDummy = () => { name = faker.lorem.word(), message = faker.lorem.words(), ) => { - const to = vestTest(name, message, jest.fn()); + const to = vestTest(name, message, vi.fn()); return to; }; @@ -55,7 +55,7 @@ const testDummy = () => { const to = vestTest( name, message, - jest.fn(() => { + vi.fn(() => { warn(); }), ); @@ -69,7 +69,7 @@ const testDummy = () => { vestTest( name, message, - jest.fn( + vi.fn( () => new Promise((_, reject) => { setTimeout(reject, time); @@ -84,7 +84,7 @@ const testDummy = () => { vestTest( name, message, - jest.fn(() => { + vi.fn(() => { warn(); return new Promise((_, reject) => { setTimeout(reject, time); @@ -99,7 +99,7 @@ const testDummy = () => { vestTest( name, message, - jest.fn( + vi.fn( () => new Promise(resolve => { setTimeout(resolve, time); @@ -114,7 +114,7 @@ const testDummy = () => { vestTest( name, message, - jest.fn(() => { + vi.fn(() => { warn(); return new Promise(resolve => { setTimeout(resolve, time); diff --git a/packages/vest/src/testUtils/vestMocks.ts b/packages/vest/src/testUtils/vestMocks.ts index c33cbe3ec..98e980967 100644 --- a/packages/vest/src/testUtils/vestMocks.ts +++ b/packages/vest/src/testUtils/vestMocks.ts @@ -8,7 +8,7 @@ export function mockIsolateTest( ): TIsolateTest { const isolate = genTestIsolate({ ...IsolateTestBase(), - testFn: jest.fn(), + testFn: vi.fn(), ...payload, type: VestIsolateType.Test, }) as TIsolateTest; diff --git a/packages/vest/tsconfig.json b/packages/vest/tsconfig.json index 1eee3487e..8feccd6d6 100644 --- a/packages/vest/tsconfig.json +++ b/packages/vest/tsconfig.json @@ -13,7 +13,6 @@ "testDummy": ["./src/testUtils/testDummy.ts"], "suiteDummy": ["./src/testUtils/suiteDummy.ts"], "partition": ["./src/testUtils/partition.ts"], - "mockThrowError": ["./src/testUtils/mockThrowError.ts"], "TVestMock": ["./src/testUtils/TVestMock.ts"], "suiteRunResult": ["./src/suiteResult/suiteRunResult.ts"], "suiteResult": ["./src/suiteResult/suiteResult.ts"], diff --git a/packages/vestjs-runtime/src/Isolate/__tests__/Isolate.test.ts b/packages/vestjs-runtime/src/Isolate/__tests__/Isolate.test.ts index a151b7ffc..1f5514761 100644 --- a/packages/vestjs-runtime/src/Isolate/__tests__/Isolate.test.ts +++ b/packages/vestjs-runtime/src/Isolate/__tests__/Isolate.test.ts @@ -1,4 +1,5 @@ import { CB } from 'vest-utils'; +import { describe, it, expect, beforeEach, vi } from 'vitest'; import { TIsolate, Isolate } from 'Isolate'; import { StateRefType, useAvailableRoot } from 'VestRuntime'; @@ -25,7 +26,7 @@ describe('Isolate', () => { }); it('Should run the passed callback', () => { - const spy = jest.fn(); + const spy = vi.fn(); withRunTime(() => { Isolate.create(IsolateType.Isolate, spy); }); @@ -108,7 +109,7 @@ describe('Isolate', () => { const isolate = withRunTime(() => { return Isolate.create(IsolateType.Isolate, () => {}); }); - const spy = jest.spyOn(isolate.abortController, 'abort'); + const spy = vi.spyOn(isolate.abortController, 'abort'); IsolateMutator.abort(isolate, 'foo'); expect(spy).toHaveBeenCalledWith('foo'); }); diff --git a/packages/vestjs-runtime/src/Isolate/__tests__/IsolateInspector.test.ts b/packages/vestjs-runtime/src/Isolate/__tests__/IsolateInspector.test.ts index 67441ec57..6631e6256 100644 --- a/packages/vestjs-runtime/src/Isolate/__tests__/IsolateInspector.test.ts +++ b/packages/vestjs-runtime/src/Isolate/__tests__/IsolateInspector.test.ts @@ -1,3 +1,5 @@ +import { describe, it, expect } from 'vitest'; + import { TIsolate } from 'Isolate'; import { IsolateInspector } from 'IsolateInspector'; diff --git a/packages/vestjs-runtime/src/Isolate/__tests__/IsolateMutator.test.ts b/packages/vestjs-runtime/src/Isolate/__tests__/IsolateMutator.test.ts index 82f954278..be4461230 100644 --- a/packages/vestjs-runtime/src/Isolate/__tests__/IsolateMutator.test.ts +++ b/packages/vestjs-runtime/src/Isolate/__tests__/IsolateMutator.test.ts @@ -1,5 +1,6 @@ import { TIsolate } from 'Isolate'; import { IsolateMutator } from 'IsolateMutator'; +import { describe, it, expect, vi } from 'vitest'; describe('IsolateMutator', () => { describe('setParent', () => { @@ -121,7 +122,7 @@ describe('IsolateMutator', () => { describe('abort', () => { it('Should abort the controller', () => { const isolate = { - abortController: { abort: jest.fn() }, + abortController: { abort: vi.fn() }, } as unknown as TIsolate; expect(isolate.abortController.abort).not.toHaveBeenCalled(); @@ -141,7 +142,7 @@ describe('IsolateMutator', () => { it('Should abort the controller with the passed reason', () => { const isolate = { - abortController: { abort: jest.fn() }, + abortController: { abort: vi.fn() }, } as unknown as TIsolate; expect(isolate.abortController.abort).not.toHaveBeenCalled(); 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 0629e6442..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 @@ -1,6 +1,6 @@ -// Jest Snapshot v1, https://goo.gl/fbAQLP +// Vitest Snapshot v1, https://vitest.dev/guide/snapshot.html -exports[`AsyncIsolate It should resolve async isolate into the parent 2`] = ` +exports[`AsyncIsolate > It should resolve async isolate into the parent 2`] = ` { "$type": "URoot", "abortController": AbortController {}, diff --git a/packages/vestjs-runtime/src/Isolate/__tests__/asyncIsolate.test.ts b/packages/vestjs-runtime/src/Isolate/__tests__/asyncIsolate.test.ts index e18a8d9e5..714610bdc 100644 --- a/packages/vestjs-runtime/src/Isolate/__tests__/asyncIsolate.test.ts +++ b/packages/vestjs-runtime/src/Isolate/__tests__/asyncIsolate.test.ts @@ -1,9 +1,10 @@ -import { CB } from 'vest-utils'; -import wait from 'wait'; - import { useBus } from 'Bus'; import { Isolate, TIsolate } from 'Isolate'; import { RuntimeEvents } from 'RuntimeEvents'; +import { CB } from 'vest-utils'; +import { describe, vi, it, expect, test } from 'vitest'; +import wait from 'wait'; + import { VestRuntime } from 'vestjs-runtime'; describe('AsyncIsolate', () => { @@ -49,7 +50,7 @@ describe('AsyncIsolate', () => { }); it('Should emit an event when an async isolate is done running', () => { - const cb = jest.fn(); + const cb = vi.fn(); return new Promise(async done => { let child = {} as TIsolate; withRunTime(() => { diff --git a/packages/vestjs-runtime/src/__tests__/IsolateWalker.test.ts b/packages/vestjs-runtime/src/__tests__/IsolateWalker.test.ts index e86cb3a30..7ff3c5d20 100644 --- a/packages/vestjs-runtime/src/__tests__/IsolateWalker.test.ts +++ b/packages/vestjs-runtime/src/__tests__/IsolateWalker.test.ts @@ -1,5 +1,5 @@ -import { TIsolate } from 'Isolate'; import { walk, reduce, findAll } from 'IsolateWalker'; +import { describe, it, expect, beforeEach } from 'vitest'; // import { TIsolate } from 'Isolate'; type WalkedNode = TIsolate<{ id: string }>; diff --git a/packages/vestjs-runtime/src/exports/__tests__/IsolateSerializer.test.ts b/packages/vestjs-runtime/src/exports/__tests__/IsolateSerializer.test.ts index df9d528aa..553d3e890 100644 --- a/packages/vestjs-runtime/src/exports/__tests__/IsolateSerializer.test.ts +++ b/packages/vestjs-runtime/src/exports/__tests__/IsolateSerializer.test.ts @@ -1,9 +1,9 @@ -import { Maybe } from 'vest-utils'; - import { Isolate, TIsolate } from 'Isolate'; -import { MinifiedKeys } from 'IsolateKeys'; import { IsolateSerializer } from 'IsolateSerializer'; -import { IsolateMutator, VestRuntime } from 'vestjs-runtime'; +import { Maybe } from 'vest-utils'; +import { describe, it, expect, test } from 'vitest'; + +import { VestRuntime } from 'vestjs-runtime'; describe('IsolateSerializer', () => { describe('serialize', () => { 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 bb92986ff..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 @@ -1,5 +1,5 @@ -// Jest Snapshot v1, https://goo.gl/fbAQLP +// Vitest Snapshot v1, https://vitest.dev/guide/snapshot.html -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 > 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 > 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/tsconfig.json b/tsconfig.json index f63991d99..f3f147415 100644 --- a/tsconfig.json +++ b/tsconfig.json @@ -21,6 +21,6 @@ "strict": true, "target": "ES2015" }, - "files": ["./vx/config/jest/globals.d.ts"], + "files": ["./vx/config/vitest/vitest.d.ts"], "include": ["./packages/*/src/**/*.ts"] } diff --git a/vitest.config.ts b/vitest.config.ts new file mode 100644 index 000000000..736555f2b --- /dev/null +++ b/vitest.config.ts @@ -0,0 +1,17 @@ +import tsconfigPaths from 'vite-tsconfig-paths'; +import { defineConfig } from 'vitest/config'; + +export default defineConfig({ + test: { + globals: true, + include: ['packages/**/__tests__/*.test.ts'], + setupFiles: ['vx/config/vitest/customMatchers.ts/customMatchers.ts'], + }, + root: __dirname, + plugins: [ + tsconfigPaths({ + loose: true, + projects: ["packages/vest-utils","packages/context","packages/vestjs-runtime","packages/vast","packages/n4s","packages/vest","packages/anyone"], + }), + ], +}); diff --git a/vitest.workspace.js b/vitest.workspace.js new file mode 100644 index 000000000..a971dee23 --- /dev/null +++ b/vitest.workspace.js @@ -0,0 +1 @@ +export default ['packages/*']; diff --git a/vx/cli.js b/vx/cli.js index ecb606c08..d5a9801e7 100755 --- a/vx/cli.js +++ b/vx/cli.js @@ -56,7 +56,7 @@ const cli = yargs(argv) const { package, command, fastBuild, _: cliOptions = [] } = cli; // Prepare all packages before running any other command. -if (command !== 'prepare') { +if (command !== 'prepare' && command !== 'dev') { commands.prepare(); } diff --git a/vx/commands/init/prompt/index.js b/vx/commands/init/prompt/index.js index d32a4fbd1..a74dccbea 100644 --- a/vx/commands/init/prompt/index.js +++ b/vx/commands/init/prompt/index.js @@ -68,6 +68,7 @@ function scaffold(config) { const template = path.resolve(vxPath.VX_COMMANDS_PATH, 'init/template'); const packagePath = vxPath.package(config.name); fsExtra.copySync(path.join(template), packagePath); + removeTemplateExtensionFromFile(packagePath, config.name); writeEntryPoint(packagePath, config.name); updateValues(packagePath, config); @@ -102,6 +103,12 @@ function updateValues(packagePath, config) { }); } +function removeTemplateExtensionFromFile(packagePath, packageName) { + glob.sync(packagePath + '/**/*.tmpl').forEach(file => { + fsExtra.moveSync(file, file.replace('.tmpl', '')); + }); +} + const configMapping = { PACKAGE_AUTHOR: 'author', PACKAGE_DESCRIPTION: 'description', diff --git a/vx/commands/init/template/tsconfig.json b/vx/commands/init/template/tsconfig.json deleted file mode 100644 index 3dda57f43..000000000 --- a/vx/commands/init/template/tsconfig.json +++ /dev/null @@ -1,46 +0,0 @@ -{ - "extends": "../../tsconfig.json", - "rootDir": ".", - "compilerOptions": { - "baseUrl": ".", - "declarationDir": "./types", - "declarationMap": true, - "outDir": "./dist", - "paths": { - "asArray": ["src/asArray.ts"], - "assign": ["src/assign.ts"], - "bindNot": ["src/bindNot.ts"], - "bus": ["src/bus.ts"], - "cache": ["src/cache.ts"], - "callEach": ["src/callEach.ts"], - "defaultTo": ["src/defaultTo.ts"], - "deferThrow": ["src/deferThrow.ts"], - "either": ["src/either.ts"], - "globals.d": ["src/globals.d.ts"], - "greaterThan": ["src/greaterThan.ts"], - "hasOwnProperty": ["src/hasOwnProperty.ts"], - "invariant": ["src/invariant.ts"], - "isArrayValue": ["src/isArrayValue.ts"], - "isBooleanValue": ["src/isBooleanValue.ts"], - "isEmpty": ["src/isEmpty.ts"], - "isFunction": ["src/isFunction.ts"], - "isNull": ["src/isNull.ts"], - "isNullish": ["src/isNullish.ts"], - "isNumeric": ["src/isNumeric.ts"], - "isPositive": ["src/isPositive.ts"], - "isPromise": ["src/isPromise.ts"], - "isStringValue": ["src/isStringValue.ts"], - "isUndefined": ["src/isUndefined.ts"], - "last": ["src/last.ts"], - "lengthEquals": ["src/lengthEquals.ts"], - "longerThan": ["src/longerThan.ts"], - "mapFirst": ["src/mapFirst.ts"], - "nestedArray": ["src/nestedArray.ts"], - "numberEquals": ["src/numberEquals.ts"], - "optionalFunctionValue": ["src/optionalFunctionValue.ts"], - "seq": ["src/seq.ts"], - "utilityTypes": ["src/utilityTypes.ts"], - "vest-utils": ["src/vest-utils.ts"] - } - } -} diff --git a/vx/commands/init/template/tsconfig.json.tmpl b/vx/commands/init/template/tsconfig.json.tmpl new file mode 100644 index 000000000..6460e44fa --- /dev/null +++ b/vx/commands/init/template/tsconfig.json.tmpl @@ -0,0 +1,11 @@ +{ + "extends": "../../tsconfig.json", + "rootDir": ".", + "compilerOptions": { + "baseUrl": ".", + "declarationDir": "./types", + "declarationMap": true, + "outDir": "./dist", + "paths": {} + } +} diff --git a/vx/commands/prepare/prepare.js b/vx/commands/prepare/prepare.js index b56d1b1a5..72551ae4f 100644 --- a/vx/commands/prepare/prepare.js +++ b/vx/commands/prepare/prepare.js @@ -1,3 +1,5 @@ +const genVitestConfig = require('../../scripts/genVitestConfig'); + const genNpmIgnore = require('vx/commands/npmignore/npmignore'); const genTsConfig = require('vx/commands/tsconfig/tsconfig'); const logger = require('vx/logger'); @@ -6,4 +8,5 @@ module.exports = () => { logger.info('Preparing packages...'); genNpmIgnore(); genTsConfig(); + genVitestConfig(); }; diff --git a/vx/commands/test/test.js b/vx/commands/test/test.js index 359132096..764cad6ca 100644 --- a/vx/commands/test/test.js +++ b/vx/commands/test/test.js @@ -5,17 +5,14 @@ const opts = require('vx/opts'); const { usePackage } = require('vx/vxContext'); const vxPath = require('vx/vxPath'); -const configOpt = `--config ${path.resolve( - vxPath.JEST_CONFIG_PATH, - opts.fileNames.JEST_CONFIG, -)}`; +const configOpt = `--config ${path.resolve(vxPath.VITEST_CONFIG_FILE_PATH)}`; function test({ cliOptions }) { const pkgName = usePackage(); exec([ - 'yarn jest', - pkgName && `--rootDir ${vxPath.package(pkgName)}`, + 'yarn vitest', + pkgName && `--project ${vxPath.package(pkgName)}`, configOpt, cliOptions, ]); diff --git a/vx/config/jest/globals.d.ts b/vx/config/jest/globals.d.ts deleted file mode 100644 index e79a000bb..000000000 --- a/vx/config/jest/globals.d.ts +++ /dev/null @@ -1,8 +0,0 @@ -declare global { - namespace jest { - interface Matchers { - isDeepCopyOf(clone: any): CustomMatcherResult; - } - } -} -export {}; diff --git a/vx/config/jest/jest.config.js b/vx/config/jest/jest.config.js deleted file mode 100644 index 4b19e3590..000000000 --- a/vx/config/jest/jest.config.js +++ /dev/null @@ -1,89 +0,0 @@ -const path = require('path'); - -const glob = require('glob'); - -const opts = require('vx/opts'); -const packageNames = require('vx/packageNames'); -const packageJson = require('vx/util/packageJson'); -const pathsPerPackage = require('vx/util/pathsPerPackage'); -const { usePackage } = require('vx/vxContext'); -const vxPath = require('vx/vxPath'); - -const setupPerPackage = glob.sync( - vxPath.packageConfigPath( - usePackage() ?? '*', - opts.dir.JEST, - opts.fileNames.JEST_SETUP, - ), -); - -const setupAfterEnvPerPackage = glob.sync( - vxPath.packageConfigPath( - usePackage() ?? '*', - opts.dir.JEST, - opts.fileNames.JEST_SETUP_AFTER_ENV, - ), -); - -const projects = packageNames.list.map(packageName => ({ - ...baseConfig(packageName), - displayName: packageName, - moduleNameMapper: genNameMapper(pathsPerPackage.packages[packageName]), - rootDir: vxPath.package(packageName), - testMatch: [ - vxPath.package(packageName, `**/${opts.dir.TESTS}/*.(spec|test).ts`), - ], -})); - -module.exports = { - projects, -}; - -function baseConfig(packageName) { - const allowResolve = packageJson.getVxAllowResolve(packageName); - return { - clearMocks: true, - maxWorkers: 1, - rootDir: vxPath.ROOT_PATH, - roots: [''], - setupFiles: [ - path.resolve(vxPath.JEST_CONFIG_PATH, opts.fileNames.JEST_SETUP), - ].concat(setupPerPackage), - setupFilesAfterEnv: [ - path.resolve( - vxPath.JEST_CONFIG_PATH, - opts.fileNames.JEST_SETUP_AFTER_ENV, - ), - ].concat(setupAfterEnvPerPackage), - testEnvironment: 'node', - transform: { - [`.+\\.(ts|tsx)$`]: [ - 'ts-jest', - { - isolatedModules: true, - tsconfig: { - // This is needed to allow jest to transform js files - // That are originated in node_modules - allowJs: true, - }, - }, - ], - }, - ...(allowResolve.length > 0 && { - preset: 'ts-jest/presets/js-with-ts', - transformIgnorePatterns: [ - `node_modules/(?!(${allowResolve.join('|')})/.*)`, - ], - }), - }; -} - -function genNameMapper(modules) { - return modules.reduce( - (aliases, { name, absolute }) => - Object.assign(aliases, { - [`^${name}$`]: absolute, - }), - {}, - ); -} diff --git a/vx/config/jest/jest.setup.ts b/vx/config/jest/jest.setup.ts deleted file mode 100644 index 95f3a2293..000000000 --- a/vx/config/jest/jest.setup.ts +++ /dev/null @@ -1,6 +0,0 @@ -import './globals.d'; - -declare namespace global { - export const __DEV__: boolean; - export const __LIB_VERSION__: string; -} diff --git a/vx/config/jest/jest.setupAfterEnv.ts b/vx/config/vitest/customMatchers.ts similarity index 94% rename from vx/config/jest/jest.setupAfterEnv.ts rename to vx/config/vitest/customMatchers.ts index 69b4d5ecf..3b8c5ee09 100644 --- a/vx/config/jest/jest.setupAfterEnv.ts +++ b/vx/config/vitest/customMatchers.ts @@ -1,12 +1,14 @@ import { isFunction } from 'vest-utils'; -import './globals.d'; +expect.extend({ + isDeepCopyOf, +}); // eslint-disable-next-line complexity -const isDeepCopyOf = ( +function isDeepCopyOf( source: any, clone: any, -): { pass: boolean; message: () => string } => { +): { pass: boolean; message: () => string } { const queue = [[source, clone]]; outer: while (queue.length) { @@ -71,8 +73,4 @@ const isDeepCopyOf = ( } return { pass: true, message: () => 'success' }; -}; - -expect.extend({ - isDeepCopyOf, -}); +} diff --git a/vx/config/vitest/vitest.d.ts b/vx/config/vitest/vitest.d.ts new file mode 100644 index 000000000..2a09b16fd --- /dev/null +++ b/vx/config/vitest/vitest.d.ts @@ -0,0 +1,12 @@ +import 'vitest'; + +interface CustomMatchers { + isDeepCopyOf(clone: any): R; +} + +declare module 'vitest' { + interface Assertion extends CustomMatchers {} + interface AsymmetricMatchersContaining extends CustomMatchers {} +} + +export {}; diff --git a/vx/opts.js b/vx/opts.js index 659b76692..c98bc146e 100644 --- a/vx/opts.js +++ b/vx/opts.js @@ -4,13 +4,13 @@ module.exports = { CONFIG: 'config', DIST: 'dist', EXPORTS: 'exports', - JEST: 'jest', PACKAGES: 'packages', ROLLUP: 'rollup', SCRIPTS: 'scripts', SRC: 'src', TESTS: '__tests__', TYPES: 'types', + VITEST: 'vitest', VX: 'vx', }, env: { @@ -20,14 +20,12 @@ module.exports = { }, fileNames: { CHANGELOG: 'CHANGELOG.md', - JEST_CONFIG: 'jest.config.js', - JEST_SETUP: 'jest.setup.ts', - JEST_SETUP_AFTER_ENV: 'jest.setupAfterEnv.ts', MAIN_EXPORT: 'index.js', NPM_IGNORE: '.npmignore', PACKAGE_JSON: 'package.json', ROLLUP_CONFIG: 'rollup.config.cjs', TSCONFIG_JSON: 'tsconfig.json', + VITEST_CONFIG: 'vitest.config.ts', VX_BUILD: 'vx.build.js', }, format: { diff --git a/vx/package.json b/vx/package.json index 8c2931aa2..afecef09c 100644 --- a/vx/package.json +++ b/vx/package.json @@ -9,14 +9,14 @@ "fs-extra": "^11.2.0", "glob": "^10.3.10", "inquirer": "^9.2.12", - "jest": "^29.7.0", "onchange": "^7.1.0", "prettier": "^3.3.1", "rollup": "^4.18.0", "rollup-plugin-terser": "^7.0.2", "rollup-plugin-ts": "^3.4.5", - "ts-jest": "^29.1.4", "vest-utils": "0.0.3", + "vite-tsconfig-paths": "^4.3.2", + "vitest": "^2.0.4", "yargs": "^17.7.2" }, "name": "vx", diff --git a/vx/scripts/build/buildPackage.js b/vx/scripts/build/buildPackage.js index 7a4326516..bfa15e190 100644 --- a/vx/scripts/build/buildPackage.js +++ b/vx/scripts/build/buildPackage.js @@ -18,7 +18,7 @@ function buildPackage(options = {}) { const format = []; if (options.fastBuild) { - format.push(opts.format.CJS); + format.push(opts.format.ES); } const baseOptions = { diff --git a/vx/scripts/genTsConfig.js b/vx/scripts/genTsConfig.js index 6b8d15a84..777f74ab0 100644 --- a/vx/scripts/genTsConfig.js +++ b/vx/scripts/genTsConfig.js @@ -6,7 +6,7 @@ const lodash = require('lodash'); const exec = require('vx/exec'); const logger = require('vx/logger'); const packageNames = require('vx/packageNames'); -const pathsPerPackage = require('vx/util/pathsPerPackage'); +const { genPathsPerPackage } = require('vx/util/pathsPerPackage'); const vxPath = require('vx/vxPath'); module.exports = function genTsConfig() { @@ -20,7 +20,7 @@ module.exports = function genTsConfig() { } packageNames.list.forEach(packageName => { - const paths = genPathsPerPackage(packageName); + const paths = genPathsPerPackage(packageName, { addPathToArray: true }); const tsConfig = packageTsConfigTemplate(paths, packageName); const tsConfigPath = vxPath.packageTsConfig(packageName); @@ -95,19 +95,7 @@ function rootTsConfigTemplate() { strict: true, target: 'ES2015', }, - files: [`${vxPath.rel(vxPath.JEST_CONFIG_PATH)}/globals.d.ts`], + files: [`${vxPath.rel(vxPath.VITEST_CONFIG_PATH)}/vitest.d.ts`], include: [vxPath.rel(vxPath.packageSrc('*', '**/*.ts'))], }; } - -function genPathsPerPackage(packageName) { - const packageData = pathsPerPackage.packages[packageName]; - - return packageData.reduce((paths, currentModule) => { - return Object.assign(paths, { - [currentModule.name]: [ - vxPath.rel(currentModule.absolute, vxPath.package(packageName)), - ], - }); - }, {}); -} diff --git a/vx/scripts/genVitestConfig.js b/vx/scripts/genVitestConfig.js new file mode 100644 index 000000000..3c91e5b11 --- /dev/null +++ b/vx/scripts/genVitestConfig.js @@ -0,0 +1,117 @@ +const fs = require('fs'); + +const exec = require('vx/exec'); +const logger = require('vx/logger'); +const opts = require('vx/opts'); +const packageNames = require('vx/packageNames'); +const packageList = require('vx/util/packageList'); +const { genPathsPerPackage, packages } = require('vx/util/pathsPerPackage'); +const vxPath = require('vx/vxPath'); + +const VITEST_CONFIG_PATH = 'vx/config/vitest/customMatchers.ts'; + +module.exports = function genVitestConfig() { + logger.info('Generating vitest.config.ts files...'); + + mainConfig(); + packageNames.list.forEach(packageName => { + perPackageConfig(packageName); + }); + + logger.info('👌 Done generating vitest.config files.\n'); +}; + +function perPackageConfig(packageName) { + const configPath = vxPath.packageVitestConfig(packageName); + + let existingContent = ''; + + if (fs.existsSync(configPath)) { + existingContent = fs.readFileSync(configPath, 'utf8'); + } + + /** + * @type {Record} alias // { 'moduleName': './path/to/moduleName' } + */ + const allPaths = genPathsPerPackage(packageName, { addPathToArray: false }); + + const alias = Object.entries(allPaths) + .map(([name, path]) => { + // is name one word or multiple words (has -)? + const nameToUse = name.match(/[-@.]/) ? `'${name}'` : name; + return `${nameToUse}: resolve(__dirname, '${path.slice(2)}')`; + }) + .join(',\n '); + + const next = genConfig(alias); + + if (existingContent === next) { + logger.log(`✅ ${packageName} vitest.config is up to date. Skipping.`); + return; + } + + logger.log(`📝 Writing vitest.config file for ${packageName}`); + + fs.writeFileSync(configPath, next, 'utf8'); +} + +function mainConfig() { + const configPath = vxPath.VITEST_CONFIG_FILE_PATH; + + let existingContent = ''; + + if (fs.existsSync(vxPath.VITEST_CONFIG_FILE_PATH)) { + existingContent = fs.readFileSync(vxPath.VITEST_CONFIG_FILE_PATH, 'utf8'); + } + + const mainConfig = mainConfigTemplate(); + + if (existingContent === mainConfig) { + logger.log('✅ Main vitest.config is up to date. Skipping.'); + return; + } + + logger.log('📝 Writing main vitest.config file'); + + fs.writeFileSync(configPath, mainConfig, 'utf8'); +} + +function mainConfigTemplate() { + return `import tsconfigPaths from 'vite-tsconfig-paths'; +import { defineConfig } from 'vitest/config'; + +export default defineConfig({ + test: { + globals: true, + include: ['${opts.dir.PACKAGES}/${vxPath.TEST_FILE_PATTERN}'], + setupFiles: ['${VITEST_CONFIG_PATH}/customMatchers.ts'], + }, + root: __dirname, + plugins: [ + tsconfigPaths({ + loose: true, + projects: ${JSON.stringify(packageList.names.map(p => `${opts.dir.PACKAGES}/${p}`))}, + }), + ], +}); +`; +} + +function genConfig(alias = {}) { + return `import { defineConfig } from 'vitest/config'; +import { resolve } from 'path'; + +export default defineConfig({ + test: { + globals: true, + include: ['./**/__tests__/*.test.ts'], + setupFiles: [resolve(__dirname, '../../', '${VITEST_CONFIG_PATH}')], + }, + root: __dirname, + resolve: { + alias: { + ${alias} + } + }, +});`; +} diff --git a/vx/util/pathsPerPackage.js b/vx/util/pathsPerPackage.js index fe7908c4b..479cb591c 100644 --- a/vx/util/pathsPerPackage.js +++ b/vx/util/pathsPerPackage.js @@ -40,6 +40,7 @@ findDuplicates(); module.exports = { packages: groupedMatches, list, + genPathsPerPackage, }; function findDuplicates() { @@ -82,3 +83,18 @@ function findDuplicates() { ); } } + +function genPathsPerPackage(packageName, { addPathToArray = false }) { + const packageData = groupedMatches[packageName]; + + return packageData.reduce((paths, currentModule) => { + const filePath = vxPath.rel( + currentModule.absolute, + vxPath.package(packageName), + ); + + return Object.assign(paths, { + [currentModule.name]: addPathToArray ? [filePath] : filePath, + }); + }, {}); +} diff --git a/vx/vxPath.js b/vx/vxPath.js index 5bb6080d6..0c7df562b 100644 --- a/vx/vxPath.js +++ b/vx/vxPath.js @@ -60,6 +60,10 @@ vxPath.packageJson = (pkgName = usePackage()) => { return vxPath.package(pkgName, opts.fileNames.PACKAGE_JSON); }; +vxPath.packageVitestConfig = (pkgName = usePackage()) => { + return vxPath.package(pkgName, opts.fileNames.VITEST_CONFIG); +}; + vxPath.packageNpmIgnore = (pkgName = usePackage()) => { return vxPath.package(pkgName, opts.fileNames.NPM_IGNORE); }; @@ -109,11 +113,14 @@ vxPath.ROLLUP_CONFIG_PATH = path.resolve( opts.fileNames.ROLLUP_CONFIG, ); -vxPath.JEST_CONFIG_PATH = path.resolve(vxPath.VX_CONFIG_PATH, opts.dir.JEST); +vxPath.VITEST_CONFIG_PATH = path.resolve( + vxPath.VX_CONFIG_PATH, + opts.dir.VITEST, +); -vxPath.JEST_CONFIG_FILE_PATH = path.resolve( - vxPath.JEST_CONFIG_PATH, - opts.fileNames.JEST_CONFIG, +vxPath.VITEST_CONFIG_FILE_PATH = path.resolve( + vxPath.ROOT_PATH, + opts.fileNames.VITEST_CONFIG, ); vxPath.TSCONFIG_PATH = path.resolve( @@ -121,6 +128,8 @@ vxPath.TSCONFIG_PATH = path.resolve( opts.fileNames.TSCONFIG_JSON, ); +vxPath.TEST_FILE_PATTERN = `**/${opts.dir.TESTS}/*.test.ts`; + vxPath.PACKAGES_PATH = path.resolve(vxPath.ROOT_PATH, opts.dir.PACKAGES); module.exports = vxPath; diff --git a/yarn.lock b/yarn.lock index dbb6ab711..ba1474368 100644 --- a/yarn.lock +++ b/yarn.lock @@ -194,13 +194,13 @@ __metadata: languageName: node linkType: hard -"@ampproject/remapping@npm:^2.2.0": - version: 2.2.1 - resolution: "@ampproject/remapping@npm:2.2.1" +"@ampproject/remapping@npm:^2.2.0, @ampproject/remapping@npm:^2.3.0": + version: 2.3.0 + resolution: "@ampproject/remapping@npm:2.3.0" dependencies: - "@jridgewell/gen-mapping": ^0.3.0 - "@jridgewell/trace-mapping": ^0.3.9 - checksum: 03c04fd526acc64a1f4df22651186f3e5ef0a9d6d6530ce4482ec9841269cf7a11dbb8af79237c282d721c5312024ff17529cd72cc4768c11e999b58e2302079 + "@jridgewell/gen-mapping": ^0.3.5 + "@jridgewell/trace-mapping": ^0.3.24 + checksum: d3ad7b89d973df059c4e8e6d7c972cbeb1bb2f18f002a3bd04ae0707da214cb06cc06929b65aa2313b9347463df2914772298bae8b1d7973f246bb3f2ab3e8f0 languageName: node linkType: hard @@ -221,7 +221,7 @@ __metadata: languageName: node linkType: hard -"@babel/core@npm:^7.11.6, @babel/core@npm:^7.12.3, @babel/core@npm:^7.21.3, @babel/core@npm:^7.23.3": +"@babel/core@npm:^7.21.3, @babel/core@npm:^7.23.3": version: 7.23.5 resolution: "@babel/core@npm:7.23.5" dependencies: @@ -244,7 +244,7 @@ __metadata: languageName: node linkType: hard -"@babel/generator@npm:^7.23.3, @babel/generator@npm:^7.23.5, @babel/generator@npm:^7.7.2": +"@babel/generator@npm:^7.23.3, @babel/generator@npm:^7.23.5": version: 7.23.5 resolution: "@babel/generator@npm:7.23.5" dependencies: @@ -516,7 +516,7 @@ __metadata: languageName: node linkType: hard -"@babel/parser@npm:^7.1.0, @babel/parser@npm:^7.14.7, @babel/parser@npm:^7.20.7, @babel/parser@npm:^7.22.15, @babel/parser@npm:^7.23.5": +"@babel/parser@npm:^7.22.15, @babel/parser@npm:^7.23.5": version: 7.23.5 resolution: "@babel/parser@npm:7.23.5" bin: @@ -581,18 +581,7 @@ __metadata: languageName: node linkType: hard -"@babel/plugin-syntax-bigint@npm:^7.8.3": - version: 7.8.3 - resolution: "@babel/plugin-syntax-bigint@npm:7.8.3" - dependencies: - "@babel/helper-plugin-utils": ^7.8.0 - peerDependencies: - "@babel/core": ^7.0.0-0 - checksum: 3a10849d83e47aec50f367a9e56a6b22d662ddce643334b087f9828f4c3dd73bdc5909aaeabe123fed78515767f9ca43498a0e621c438d1cd2802d7fae3c9648 - languageName: node - linkType: hard - -"@babel/plugin-syntax-class-properties@npm:^7.12.13, @babel/plugin-syntax-class-properties@npm:^7.8.3": +"@babel/plugin-syntax-class-properties@npm:^7.12.13": version: 7.12.13 resolution: "@babel/plugin-syntax-class-properties@npm:7.12.13" dependencies: @@ -658,7 +647,7 @@ __metadata: languageName: node linkType: hard -"@babel/plugin-syntax-import-meta@npm:^7.10.4, @babel/plugin-syntax-import-meta@npm:^7.8.3": +"@babel/plugin-syntax-import-meta@npm:^7.10.4": version: 7.10.4 resolution: "@babel/plugin-syntax-import-meta@npm:7.10.4" dependencies: @@ -680,7 +669,7 @@ __metadata: languageName: node linkType: hard -"@babel/plugin-syntax-jsx@npm:^7.23.3, @babel/plugin-syntax-jsx@npm:^7.7.2": +"@babel/plugin-syntax-jsx@npm:^7.23.3": version: 7.23.3 resolution: "@babel/plugin-syntax-jsx@npm:7.23.3" dependencies: @@ -691,7 +680,7 @@ __metadata: languageName: node linkType: hard -"@babel/plugin-syntax-logical-assignment-operators@npm:^7.10.4, @babel/plugin-syntax-logical-assignment-operators@npm:^7.8.3": +"@babel/plugin-syntax-logical-assignment-operators@npm:^7.10.4": version: 7.10.4 resolution: "@babel/plugin-syntax-logical-assignment-operators@npm:7.10.4" dependencies: @@ -713,7 +702,7 @@ __metadata: languageName: node linkType: hard -"@babel/plugin-syntax-numeric-separator@npm:^7.10.4, @babel/plugin-syntax-numeric-separator@npm:^7.8.3": +"@babel/plugin-syntax-numeric-separator@npm:^7.10.4": version: 7.10.4 resolution: "@babel/plugin-syntax-numeric-separator@npm:7.10.4" dependencies: @@ -768,7 +757,7 @@ __metadata: languageName: node linkType: hard -"@babel/plugin-syntax-top-level-await@npm:^7.14.5, @babel/plugin-syntax-top-level-await@npm:^7.8.3": +"@babel/plugin-syntax-top-level-await@npm:^7.14.5": version: 7.14.5 resolution: "@babel/plugin-syntax-top-level-await@npm:7.14.5" dependencies: @@ -779,7 +768,7 @@ __metadata: languageName: node linkType: hard -"@babel/plugin-syntax-typescript@npm:^7.23.3, @babel/plugin-syntax-typescript@npm:^7.7.2": +"@babel/plugin-syntax-typescript@npm:^7.23.3": version: 7.23.3 resolution: "@babel/plugin-syntax-typescript@npm:7.23.3" dependencies: @@ -1632,7 +1621,7 @@ __metadata: languageName: node linkType: hard -"@babel/template@npm:^7.22.15, @babel/template@npm:^7.3.3": +"@babel/template@npm:^7.22.15": version: 7.22.15 resolution: "@babel/template@npm:7.22.15" dependencies: @@ -1661,7 +1650,7 @@ __metadata: languageName: node linkType: hard -"@babel/types@npm:^7.0.0, @babel/types@npm:^7.20.7, @babel/types@npm:^7.21.3, @babel/types@npm:^7.22.15, @babel/types@npm:^7.22.19, @babel/types@npm:^7.22.5, @babel/types@npm:^7.23.0, @babel/types@npm:^7.23.4, @babel/types@npm:^7.23.5, @babel/types@npm:^7.3.0, @babel/types@npm:^7.3.3, @babel/types@npm:^7.4.4, @babel/types@npm:^7.8.3": +"@babel/types@npm:^7.21.3, @babel/types@npm:^7.22.15, @babel/types@npm:^7.22.19, @babel/types@npm:^7.22.5, @babel/types@npm:^7.23.0, @babel/types@npm:^7.23.4, @babel/types@npm:^7.23.5, @babel/types@npm:^7.4.4, @babel/types@npm:^7.8.3": version: 7.23.5 resolution: "@babel/types@npm:7.23.5" dependencies: @@ -1672,13 +1661,6 @@ __metadata: languageName: node linkType: hard -"@bcoe/v8-coverage@npm:^0.2.3": - version: 0.2.3 - resolution: "@bcoe/v8-coverage@npm:0.2.3" - checksum: 850f9305536d0f2bd13e9e0881cb5f02e4f93fad1189f7b2d4bebf694e3206924eadee1068130d43c11b750efcc9405f88a8e42ef098b6d75239c0f047de1a27 - languageName: node - linkType: hard - "@blakeembrey/deque@npm:^1.0.5": version: 1.0.5 resolution: "@blakeembrey/deque@npm:1.0.5" @@ -2297,6 +2279,167 @@ __metadata: languageName: node linkType: hard +"@esbuild/aix-ppc64@npm:0.21.5": + version: 0.21.5 + resolution: "@esbuild/aix-ppc64@npm:0.21.5" + conditions: os=aix & cpu=ppc64 + languageName: node + linkType: hard + +"@esbuild/android-arm64@npm:0.21.5": + version: 0.21.5 + resolution: "@esbuild/android-arm64@npm:0.21.5" + conditions: os=android & cpu=arm64 + languageName: node + linkType: hard + +"@esbuild/android-arm@npm:0.21.5": + version: 0.21.5 + resolution: "@esbuild/android-arm@npm:0.21.5" + conditions: os=android & cpu=arm + languageName: node + linkType: hard + +"@esbuild/android-x64@npm:0.21.5": + version: 0.21.5 + resolution: "@esbuild/android-x64@npm:0.21.5" + conditions: os=android & cpu=x64 + languageName: node + linkType: hard + +"@esbuild/darwin-arm64@npm:0.21.5": + version: 0.21.5 + resolution: "@esbuild/darwin-arm64@npm:0.21.5" + conditions: os=darwin & cpu=arm64 + languageName: node + linkType: hard + +"@esbuild/darwin-x64@npm:0.21.5": + version: 0.21.5 + resolution: "@esbuild/darwin-x64@npm:0.21.5" + conditions: os=darwin & cpu=x64 + languageName: node + linkType: hard + +"@esbuild/freebsd-arm64@npm:0.21.5": + version: 0.21.5 + resolution: "@esbuild/freebsd-arm64@npm:0.21.5" + conditions: os=freebsd & cpu=arm64 + languageName: node + linkType: hard + +"@esbuild/freebsd-x64@npm:0.21.5": + version: 0.21.5 + resolution: "@esbuild/freebsd-x64@npm:0.21.5" + conditions: os=freebsd & cpu=x64 + languageName: node + linkType: hard + +"@esbuild/linux-arm64@npm:0.21.5": + version: 0.21.5 + resolution: "@esbuild/linux-arm64@npm:0.21.5" + conditions: os=linux & cpu=arm64 + languageName: node + linkType: hard + +"@esbuild/linux-arm@npm:0.21.5": + version: 0.21.5 + resolution: "@esbuild/linux-arm@npm:0.21.5" + conditions: os=linux & cpu=arm + languageName: node + linkType: hard + +"@esbuild/linux-ia32@npm:0.21.5": + version: 0.21.5 + resolution: "@esbuild/linux-ia32@npm:0.21.5" + conditions: os=linux & cpu=ia32 + languageName: node + linkType: hard + +"@esbuild/linux-loong64@npm:0.21.5": + version: 0.21.5 + resolution: "@esbuild/linux-loong64@npm:0.21.5" + conditions: os=linux & cpu=loong64 + languageName: node + linkType: hard + +"@esbuild/linux-mips64el@npm:0.21.5": + version: 0.21.5 + resolution: "@esbuild/linux-mips64el@npm:0.21.5" + conditions: os=linux & cpu=mips64el + languageName: node + linkType: hard + +"@esbuild/linux-ppc64@npm:0.21.5": + version: 0.21.5 + resolution: "@esbuild/linux-ppc64@npm:0.21.5" + conditions: os=linux & cpu=ppc64 + languageName: node + linkType: hard + +"@esbuild/linux-riscv64@npm:0.21.5": + version: 0.21.5 + resolution: "@esbuild/linux-riscv64@npm:0.21.5" + conditions: os=linux & cpu=riscv64 + languageName: node + linkType: hard + +"@esbuild/linux-s390x@npm:0.21.5": + version: 0.21.5 + resolution: "@esbuild/linux-s390x@npm:0.21.5" + conditions: os=linux & cpu=s390x + languageName: node + linkType: hard + +"@esbuild/linux-x64@npm:0.21.5": + version: 0.21.5 + resolution: "@esbuild/linux-x64@npm:0.21.5" + conditions: os=linux & cpu=x64 + languageName: node + linkType: hard + +"@esbuild/netbsd-x64@npm:0.21.5": + version: 0.21.5 + resolution: "@esbuild/netbsd-x64@npm:0.21.5" + conditions: os=netbsd & cpu=x64 + languageName: node + linkType: hard + +"@esbuild/openbsd-x64@npm:0.21.5": + version: 0.21.5 + resolution: "@esbuild/openbsd-x64@npm:0.21.5" + conditions: os=openbsd & cpu=x64 + languageName: node + linkType: hard + +"@esbuild/sunos-x64@npm:0.21.5": + version: 0.21.5 + resolution: "@esbuild/sunos-x64@npm:0.21.5" + conditions: os=sunos & cpu=x64 + languageName: node + linkType: hard + +"@esbuild/win32-arm64@npm:0.21.5": + version: 0.21.5 + resolution: "@esbuild/win32-arm64@npm:0.21.5" + conditions: os=win32 & cpu=arm64 + languageName: node + linkType: hard + +"@esbuild/win32-ia32@npm:0.21.5": + version: 0.21.5 + resolution: "@esbuild/win32-ia32@npm:0.21.5" + conditions: os=win32 & cpu=ia32 + languageName: node + linkType: hard + +"@esbuild/win32-x64@npm:0.21.5": + version: 0.21.5 + resolution: "@esbuild/win32-x64@npm:0.21.5" + conditions: os=win32 & cpu=x64 + languageName: node + linkType: hard + "@eslint-community/eslint-utils@npm:^4.2.0, @eslint-community/eslint-utils@npm:^4.4.0": version: 4.4.0 resolution: "@eslint-community/eslint-utils@npm:4.4.0" @@ -2408,93 +2551,6 @@ __metadata: languageName: node linkType: hard -"@istanbuljs/load-nyc-config@npm:^1.0.0": - version: 1.1.0 - resolution: "@istanbuljs/load-nyc-config@npm:1.1.0" - dependencies: - camelcase: ^5.3.1 - find-up: ^4.1.0 - get-package-type: ^0.1.0 - js-yaml: ^3.13.1 - resolve-from: ^5.0.0 - checksum: d578da5e2e804d5c93228450a1380e1a3c691de4953acc162f387b717258512a3e07b83510a936d9fab03eac90817473917e24f5d16297af3867f59328d58568 - languageName: node - linkType: hard - -"@istanbuljs/schema@npm:^0.1.2": - version: 0.1.3 - resolution: "@istanbuljs/schema@npm:0.1.3" - checksum: 5282759d961d61350f33d9118d16bcaed914ebf8061a52f4fa474b2cb08720c9c81d165e13b82f2e5a8a212cc5af482f0c6fc1ac27b9e067e5394c9a6ed186c9 - languageName: node - linkType: hard - -"@jest/console@npm:^29.7.0": - version: 29.7.0 - resolution: "@jest/console@npm:29.7.0" - dependencies: - "@jest/types": ^29.6.3 - "@types/node": "*" - chalk: ^4.0.0 - jest-message-util: ^29.7.0 - jest-util: ^29.7.0 - slash: ^3.0.0 - checksum: 0e3624e32c5a8e7361e889db70b170876401b7d70f509a2538c31d5cd50deb0c1ae4b92dc63fe18a0902e0a48c590c21d53787a0df41a52b34fa7cab96c384d6 - languageName: node - linkType: hard - -"@jest/core@npm:^29.7.0": - version: 29.7.0 - resolution: "@jest/core@npm:29.7.0" - dependencies: - "@jest/console": ^29.7.0 - "@jest/reporters": ^29.7.0 - "@jest/test-result": ^29.7.0 - "@jest/transform": ^29.7.0 - "@jest/types": ^29.6.3 - "@types/node": "*" - ansi-escapes: ^4.2.1 - chalk: ^4.0.0 - ci-info: ^3.2.0 - exit: ^0.1.2 - graceful-fs: ^4.2.9 - jest-changed-files: ^29.7.0 - jest-config: ^29.7.0 - jest-haste-map: ^29.7.0 - jest-message-util: ^29.7.0 - jest-regex-util: ^29.6.3 - jest-resolve: ^29.7.0 - jest-resolve-dependencies: ^29.7.0 - jest-runner: ^29.7.0 - jest-runtime: ^29.7.0 - jest-snapshot: ^29.7.0 - jest-util: ^29.7.0 - jest-validate: ^29.7.0 - jest-watcher: ^29.7.0 - micromatch: ^4.0.4 - pretty-format: ^29.7.0 - slash: ^3.0.0 - strip-ansi: ^6.0.0 - peerDependencies: - node-notifier: ^8.0.1 || ^9.0.0 || ^10.0.0 - peerDependenciesMeta: - node-notifier: - optional: true - checksum: af759c9781cfc914553320446ce4e47775ae42779e73621c438feb1e4231a5d4862f84b1d8565926f2d1aab29b3ec3dcfdc84db28608bdf5f29867124ebcfc0d - languageName: node - linkType: hard - -"@jest/environment@npm:^29.7.0": - version: 29.7.0 - resolution: "@jest/environment@npm:29.7.0" - dependencies: - "@jest/fake-timers": ^29.7.0 - "@jest/types": ^29.6.3 - "@types/node": "*" - jest-mock: ^29.7.0 - checksum: 6fb398143b2543d4b9b8d1c6dbce83fa5247f84f550330604be744e24c2bd2178bb893657d62d1b97cf2f24baf85c450223f8237cccb71192c36a38ea2272934 - languageName: node - linkType: hard - "@jest/expect-utils@npm:^29.7.0": version: 29.7.0 resolution: "@jest/expect-utils@npm:29.7.0" @@ -2504,79 +2560,6 @@ __metadata: languageName: node linkType: hard -"@jest/expect@npm:^29.7.0": - version: 29.7.0 - resolution: "@jest/expect@npm:29.7.0" - dependencies: - expect: ^29.7.0 - jest-snapshot: ^29.7.0 - checksum: a01cb85fd9401bab3370618f4b9013b90c93536562222d920e702a0b575d239d74cecfe98010aaec7ad464f67cf534a353d92d181646a4b792acaa7e912ae55e - languageName: node - linkType: hard - -"@jest/fake-timers@npm:^29.7.0": - version: 29.7.0 - resolution: "@jest/fake-timers@npm:29.7.0" - dependencies: - "@jest/types": ^29.6.3 - "@sinonjs/fake-timers": ^10.0.2 - "@types/node": "*" - jest-message-util: ^29.7.0 - jest-mock: ^29.7.0 - jest-util: ^29.7.0 - checksum: caf2bbd11f71c9241b458d1b5a66cbe95debc5a15d96442444b5d5c7ba774f523c76627c6931cca5e10e76f0d08761f6f1f01a608898f4751a0eee54fc3d8d00 - languageName: node - linkType: hard - -"@jest/globals@npm:^29.7.0": - version: 29.7.0 - resolution: "@jest/globals@npm:29.7.0" - dependencies: - "@jest/environment": ^29.7.0 - "@jest/expect": ^29.7.0 - "@jest/types": ^29.6.3 - jest-mock: ^29.7.0 - checksum: 97dbb9459135693ad3a422e65ca1c250f03d82b2a77f6207e7fa0edd2c9d2015fbe4346f3dc9ebff1678b9d8da74754d4d440b7837497f8927059c0642a22123 - languageName: node - linkType: hard - -"@jest/reporters@npm:^29.7.0": - version: 29.7.0 - resolution: "@jest/reporters@npm:29.7.0" - dependencies: - "@bcoe/v8-coverage": ^0.2.3 - "@jest/console": ^29.7.0 - "@jest/test-result": ^29.7.0 - "@jest/transform": ^29.7.0 - "@jest/types": ^29.6.3 - "@jridgewell/trace-mapping": ^0.3.18 - "@types/node": "*" - chalk: ^4.0.0 - collect-v8-coverage: ^1.0.0 - exit: ^0.1.2 - glob: ^7.1.3 - graceful-fs: ^4.2.9 - istanbul-lib-coverage: ^3.0.0 - istanbul-lib-instrument: ^6.0.0 - istanbul-lib-report: ^3.0.0 - istanbul-lib-source-maps: ^4.0.0 - istanbul-reports: ^3.1.3 - jest-message-util: ^29.7.0 - jest-util: ^29.7.0 - jest-worker: ^29.7.0 - slash: ^3.0.0 - string-length: ^4.0.1 - strip-ansi: ^6.0.0 - v8-to-istanbul: ^9.0.1 - peerDependencies: - node-notifier: ^8.0.1 || ^9.0.0 || ^10.0.0 - peerDependenciesMeta: - node-notifier: - optional: true - checksum: 7eadabd62cc344f629024b8a268ecc8367dba756152b761bdcb7b7e570a3864fc51b2a9810cd310d85e0a0173ef002ba4528d5ea0329fbf66ee2a3ada9c40455 - languageName: node - linkType: hard - "@jest/schemas@npm:^29.6.3": version: 29.6.3 resolution: "@jest/schemas@npm:29.6.3" @@ -2586,64 +2569,6 @@ __metadata: languageName: node linkType: hard -"@jest/source-map@npm:^29.6.3": - version: 29.6.3 - resolution: "@jest/source-map@npm:29.6.3" - dependencies: - "@jridgewell/trace-mapping": ^0.3.18 - callsites: ^3.0.0 - graceful-fs: ^4.2.9 - checksum: bcc5a8697d471396c0003b0bfa09722c3cd879ad697eb9c431e6164e2ea7008238a01a07193dfe3cbb48b1d258eb7251f6efcea36f64e1ebc464ea3c03ae2deb - languageName: node - linkType: hard - -"@jest/test-result@npm:^29.7.0": - version: 29.7.0 - resolution: "@jest/test-result@npm:29.7.0" - dependencies: - "@jest/console": ^29.7.0 - "@jest/types": ^29.6.3 - "@types/istanbul-lib-coverage": ^2.0.0 - collect-v8-coverage: ^1.0.0 - checksum: 67b6317d526e335212e5da0e768e3b8ab8a53df110361b80761353ad23b6aea4432b7c5665bdeb87658ea373b90fb1afe02ed3611ef6c858c7fba377505057fa - languageName: node - linkType: hard - -"@jest/test-sequencer@npm:^29.7.0": - version: 29.7.0 - resolution: "@jest/test-sequencer@npm:29.7.0" - dependencies: - "@jest/test-result": ^29.7.0 - graceful-fs: ^4.2.9 - jest-haste-map: ^29.7.0 - slash: ^3.0.0 - checksum: 73f43599017946be85c0b6357993b038f875b796e2f0950487a82f4ebcb115fa12131932dd9904026b4ad8be131fe6e28bd8d0aa93b1563705185f9804bff8bd - languageName: node - linkType: hard - -"@jest/transform@npm:^29.7.0": - version: 29.7.0 - resolution: "@jest/transform@npm:29.7.0" - dependencies: - "@babel/core": ^7.11.6 - "@jest/types": ^29.6.3 - "@jridgewell/trace-mapping": ^0.3.18 - babel-plugin-istanbul: ^6.1.1 - chalk: ^4.0.0 - convert-source-map: ^2.0.0 - fast-json-stable-stringify: ^2.1.0 - graceful-fs: ^4.2.9 - jest-haste-map: ^29.7.0 - jest-regex-util: ^29.6.3 - jest-util: ^29.7.0 - micromatch: ^4.0.4 - pirates: ^4.0.4 - slash: ^3.0.0 - write-file-atomic: ^4.0.2 - checksum: 0f8ac9f413903b3cb6d240102db848f2a354f63971ab885833799a9964999dd51c388162106a807f810071f864302cdd8e3f0c241c29ce02d85a36f18f3f40ab - languageName: node - linkType: hard - "@jest/types@npm:^29.6.3": version: 29.6.3 resolution: "@jest/types@npm:29.6.3" @@ -2658,14 +2583,14 @@ __metadata: languageName: node linkType: hard -"@jridgewell/gen-mapping@npm:^0.3.0, @jridgewell/gen-mapping@npm:^0.3.2": - version: 0.3.3 - resolution: "@jridgewell/gen-mapping@npm:0.3.3" +"@jridgewell/gen-mapping@npm:^0.3.0, @jridgewell/gen-mapping@npm:^0.3.2, @jridgewell/gen-mapping@npm:^0.3.5": + version: 0.3.5 + resolution: "@jridgewell/gen-mapping@npm:0.3.5" dependencies: - "@jridgewell/set-array": ^1.0.1 + "@jridgewell/set-array": ^1.2.1 "@jridgewell/sourcemap-codec": ^1.4.10 - "@jridgewell/trace-mapping": ^0.3.9 - checksum: 4a74944bd31f22354fc01c3da32e83c19e519e3bbadafa114f6da4522ea77dd0c2842607e923a591d60a76699d819a2fbb6f3552e277efdb9b58b081390b60ab + "@jridgewell/trace-mapping": ^0.3.24 + checksum: ff7a1764ebd76a5e129c8890aa3e2f46045109dabde62b0b6c6a250152227647178ff2069ea234753a690d8f3c4ac8b5e7b267bbee272bffb7f3b0a370ab6e52 languageName: node linkType: hard @@ -2676,10 +2601,10 @@ __metadata: languageName: node linkType: hard -"@jridgewell/set-array@npm:^1.0.1": - version: 1.1.2 - resolution: "@jridgewell/set-array@npm:1.1.2" - checksum: 69a84d5980385f396ff60a175f7177af0b8da4ddb81824cb7016a9ef914eee9806c72b6b65942003c63f7983d4f39a5c6c27185bbca88eb4690b62075602e28e +"@jridgewell/set-array@npm:^1.2.1": + version: 1.2.1 + resolution: "@jridgewell/set-array@npm:1.2.1" + checksum: 832e513a85a588f8ed4f27d1279420d8547743cc37fcad5a5a76fc74bb895b013dfe614d0eed9cb860048e6546b798f8f2652020b4b2ba0561b05caa8c654b10 languageName: node linkType: hard @@ -2693,20 +2618,20 @@ __metadata: languageName: node linkType: hard -"@jridgewell/sourcemap-codec@npm:^1.4.10, @jridgewell/sourcemap-codec@npm:^1.4.14, @jridgewell/sourcemap-codec@npm:^1.4.15": - version: 1.4.15 - resolution: "@jridgewell/sourcemap-codec@npm:1.4.15" - checksum: b881c7e503db3fc7f3c1f35a1dd2655a188cc51a3612d76efc8a6eb74728bef5606e6758ee77423e564092b4a518aba569bbb21c9bac5ab7a35b0c6ae7e344c8 +"@jridgewell/sourcemap-codec@npm:^1.4.10, @jridgewell/sourcemap-codec@npm:^1.4.14, @jridgewell/sourcemap-codec@npm:^1.5.0": + version: 1.5.0 + resolution: "@jridgewell/sourcemap-codec@npm:1.5.0" + checksum: 05df4f2538b3b0f998ea4c1cd34574d0feba216fa5d4ccaef0187d12abf82eafe6021cec8b49f9bb4d90f2ba4582ccc581e72986a5fcf4176ae0cfeb04cf52ec languageName: node linkType: hard -"@jridgewell/trace-mapping@npm:^0.3.12, @jridgewell/trace-mapping@npm:^0.3.17, @jridgewell/trace-mapping@npm:^0.3.18, @jridgewell/trace-mapping@npm:^0.3.9": - version: 0.3.19 - resolution: "@jridgewell/trace-mapping@npm:0.3.19" +"@jridgewell/trace-mapping@npm:^0.3.17, @jridgewell/trace-mapping@npm:^0.3.18, @jridgewell/trace-mapping@npm:^0.3.24, @jridgewell/trace-mapping@npm:^0.3.9": + version: 0.3.25 + resolution: "@jridgewell/trace-mapping@npm:0.3.25" dependencies: "@jridgewell/resolve-uri": ^3.1.0 "@jridgewell/sourcemap-codec": ^1.4.14 - checksum: 956a6f0f6fec060fb48c6bf1f5ec2064e13cd38c8be3873877d4b92b4a27ba58289a34071752671262a3e3c202abcc3fa2aac64d8447b4b0fa1ba3c9047f1c20 + checksum: 9d3c40d225e139987b50c48988f8717a54a8c994d8a948ee42e1412e08988761d0754d7d10b803061cc3aebf35f92a5dbbab493bd0e1a9ef9e89a2130e83ba34 languageName: node linkType: hard @@ -3053,114 +2978,114 @@ __metadata: languageName: node linkType: hard -"@rollup/rollup-android-arm-eabi@npm:4.18.0": - version: 4.18.0 - resolution: "@rollup/rollup-android-arm-eabi@npm:4.18.0" +"@rollup/rollup-android-arm-eabi@npm:4.19.1": + version: 4.19.1 + resolution: "@rollup/rollup-android-arm-eabi@npm:4.19.1" conditions: os=android & cpu=arm languageName: node linkType: hard -"@rollup/rollup-android-arm64@npm:4.18.0": - version: 4.18.0 - resolution: "@rollup/rollup-android-arm64@npm:4.18.0" +"@rollup/rollup-android-arm64@npm:4.19.1": + version: 4.19.1 + resolution: "@rollup/rollup-android-arm64@npm:4.19.1" conditions: os=android & cpu=arm64 languageName: node linkType: hard -"@rollup/rollup-darwin-arm64@npm:4.18.0": - version: 4.18.0 - resolution: "@rollup/rollup-darwin-arm64@npm:4.18.0" +"@rollup/rollup-darwin-arm64@npm:4.19.1": + version: 4.19.1 + resolution: "@rollup/rollup-darwin-arm64@npm:4.19.1" conditions: os=darwin & cpu=arm64 languageName: node linkType: hard -"@rollup/rollup-darwin-x64@npm:4.18.0": - version: 4.18.0 - resolution: "@rollup/rollup-darwin-x64@npm:4.18.0" +"@rollup/rollup-darwin-x64@npm:4.19.1": + version: 4.19.1 + resolution: "@rollup/rollup-darwin-x64@npm:4.19.1" conditions: os=darwin & cpu=x64 languageName: node linkType: hard -"@rollup/rollup-linux-arm-gnueabihf@npm:4.18.0": - version: 4.18.0 - resolution: "@rollup/rollup-linux-arm-gnueabihf@npm:4.18.0" +"@rollup/rollup-linux-arm-gnueabihf@npm:4.19.1": + version: 4.19.1 + resolution: "@rollup/rollup-linux-arm-gnueabihf@npm:4.19.1" conditions: os=linux & cpu=arm & libc=glibc languageName: node linkType: hard -"@rollup/rollup-linux-arm-musleabihf@npm:4.18.0": - version: 4.18.0 - resolution: "@rollup/rollup-linux-arm-musleabihf@npm:4.18.0" +"@rollup/rollup-linux-arm-musleabihf@npm:4.19.1": + version: 4.19.1 + resolution: "@rollup/rollup-linux-arm-musleabihf@npm:4.19.1" conditions: os=linux & cpu=arm & libc=musl languageName: node linkType: hard -"@rollup/rollup-linux-arm64-gnu@npm:4.18.0": - version: 4.18.0 - resolution: "@rollup/rollup-linux-arm64-gnu@npm:4.18.0" +"@rollup/rollup-linux-arm64-gnu@npm:4.19.1": + version: 4.19.1 + resolution: "@rollup/rollup-linux-arm64-gnu@npm:4.19.1" conditions: os=linux & cpu=arm64 & libc=glibc languageName: node linkType: hard -"@rollup/rollup-linux-arm64-musl@npm:4.18.0": - version: 4.18.0 - resolution: "@rollup/rollup-linux-arm64-musl@npm:4.18.0" +"@rollup/rollup-linux-arm64-musl@npm:4.19.1": + version: 4.19.1 + resolution: "@rollup/rollup-linux-arm64-musl@npm:4.19.1" conditions: os=linux & cpu=arm64 & libc=musl languageName: node linkType: hard -"@rollup/rollup-linux-powerpc64le-gnu@npm:4.18.0": - version: 4.18.0 - resolution: "@rollup/rollup-linux-powerpc64le-gnu@npm:4.18.0" +"@rollup/rollup-linux-powerpc64le-gnu@npm:4.19.1": + version: 4.19.1 + resolution: "@rollup/rollup-linux-powerpc64le-gnu@npm:4.19.1" conditions: os=linux & cpu=ppc64 & libc=glibc languageName: node linkType: hard -"@rollup/rollup-linux-riscv64-gnu@npm:4.18.0": - version: 4.18.0 - resolution: "@rollup/rollup-linux-riscv64-gnu@npm:4.18.0" +"@rollup/rollup-linux-riscv64-gnu@npm:4.19.1": + version: 4.19.1 + resolution: "@rollup/rollup-linux-riscv64-gnu@npm:4.19.1" conditions: os=linux & cpu=riscv64 & libc=glibc languageName: node linkType: hard -"@rollup/rollup-linux-s390x-gnu@npm:4.18.0": - version: 4.18.0 - resolution: "@rollup/rollup-linux-s390x-gnu@npm:4.18.0" +"@rollup/rollup-linux-s390x-gnu@npm:4.19.1": + version: 4.19.1 + resolution: "@rollup/rollup-linux-s390x-gnu@npm:4.19.1" conditions: os=linux & cpu=s390x & libc=glibc languageName: node linkType: hard -"@rollup/rollup-linux-x64-gnu@npm:4.18.0": - version: 4.18.0 - resolution: "@rollup/rollup-linux-x64-gnu@npm:4.18.0" +"@rollup/rollup-linux-x64-gnu@npm:4.19.1": + version: 4.19.1 + resolution: "@rollup/rollup-linux-x64-gnu@npm:4.19.1" conditions: os=linux & cpu=x64 & libc=glibc languageName: node linkType: hard -"@rollup/rollup-linux-x64-musl@npm:4.18.0": - version: 4.18.0 - resolution: "@rollup/rollup-linux-x64-musl@npm:4.18.0" +"@rollup/rollup-linux-x64-musl@npm:4.19.1": + version: 4.19.1 + resolution: "@rollup/rollup-linux-x64-musl@npm:4.19.1" conditions: os=linux & cpu=x64 & libc=musl languageName: node linkType: hard -"@rollup/rollup-win32-arm64-msvc@npm:4.18.0": - version: 4.18.0 - resolution: "@rollup/rollup-win32-arm64-msvc@npm:4.18.0" +"@rollup/rollup-win32-arm64-msvc@npm:4.19.1": + version: 4.19.1 + resolution: "@rollup/rollup-win32-arm64-msvc@npm:4.19.1" conditions: os=win32 & cpu=arm64 languageName: node linkType: hard -"@rollup/rollup-win32-ia32-msvc@npm:4.18.0": - version: 4.18.0 - resolution: "@rollup/rollup-win32-ia32-msvc@npm:4.18.0" +"@rollup/rollup-win32-ia32-msvc@npm:4.19.1": + version: 4.19.1 + resolution: "@rollup/rollup-win32-ia32-msvc@npm:4.19.1" conditions: os=win32 & cpu=ia32 languageName: node linkType: hard -"@rollup/rollup-win32-x64-msvc@npm:4.18.0": - version: 4.18.0 - resolution: "@rollup/rollup-win32-x64-msvc@npm:4.18.0" +"@rollup/rollup-win32-x64-msvc@npm:4.19.1": + version: 4.19.1 + resolution: "@rollup/rollup-win32-x64-msvc@npm:4.19.1" conditions: os=win32 & cpu=x64 languageName: node linkType: hard @@ -3209,24 +3134,6 @@ __metadata: languageName: node linkType: hard -"@sinonjs/commons@npm:^2.0.0": - version: 2.0.0 - resolution: "@sinonjs/commons@npm:2.0.0" - dependencies: - type-detect: 4.0.8 - checksum: 5023ba17edf2b85ed58262313b8e9b59e23c6860681a9af0200f239fe939e2b79736d04a260e8270ddd57196851dde3ba754d7230be5c5234e777ae2ca8af137 - languageName: node - linkType: hard - -"@sinonjs/fake-timers@npm:^10.0.2": - version: 10.0.2 - resolution: "@sinonjs/fake-timers@npm:10.0.2" - dependencies: - "@sinonjs/commons": ^2.0.0 - checksum: c62aa98e7cefda8dedc101ce227abc888dc46b8ff9706c5f0a8dfd9c3ada97d0a5611384738d9ba0b26b59f99c2ba24efece8e779bb08329e9e87358fa309824 - languageName: node - linkType: hard - "@slorber/remark-comment@npm:^1.0.0": version: 1.0.0 resolution: "@slorber/remark-comment@npm:1.0.0" @@ -3426,47 +3333,6 @@ __metadata: languageName: node linkType: hard -"@types/babel__core@npm:^7.1.14": - version: 7.20.0 - resolution: "@types/babel__core@npm:7.20.0" - dependencies: - "@babel/parser": ^7.20.7 - "@babel/types": ^7.20.7 - "@types/babel__generator": "*" - "@types/babel__template": "*" - "@types/babel__traverse": "*" - checksum: 49b601a0a7637f1f387442c8156bd086cfd10ff4b82b0e1994e73a6396643b5435366fb33d6b604eade8467cca594ef97adcbc412aede90bb112ebe88d0ad6df - languageName: node - linkType: hard - -"@types/babel__generator@npm:*": - version: 7.6.4 - resolution: "@types/babel__generator@npm:7.6.4" - dependencies: - "@babel/types": ^7.0.0 - checksum: 20effbbb5f8a3a0211e95959d06ae70c097fb6191011b73b38fe86deebefad8e09ee014605e0fd3cdaedc73d158be555866810e9166e1f09e4cfd880b874dcb0 - languageName: node - linkType: hard - -"@types/babel__template@npm:*": - version: 7.4.1 - resolution: "@types/babel__template@npm:7.4.1" - dependencies: - "@babel/parser": ^7.1.0 - "@babel/types": ^7.0.0 - checksum: 649fe8b42c2876be1fd28c6ed9b276f78152d5904ec290b6c861d9ef324206e0a5c242e8305c421ac52ecf6358fa7e32ab7a692f55370484825c1df29b1596ee - languageName: node - linkType: hard - -"@types/babel__traverse@npm:*, @types/babel__traverse@npm:^7.0.6": - version: 7.18.3 - resolution: "@types/babel__traverse@npm:7.18.3" - dependencies: - "@babel/types": ^7.3.0 - checksum: d20953338b2f012ab7750932ece0a78e7d1645b0a6ff42d49be90f55e9998085da1374a9786a7da252df89555c6586695ba4d1d4b4e88ab2b9f306bcd35e00d3 - languageName: node - linkType: hard - "@types/body-parser@npm:*": version: 1.19.2 resolution: "@types/body-parser@npm:1.19.2" @@ -3573,15 +3439,6 @@ __metadata: languageName: node linkType: hard -"@types/graceful-fs@npm:^4.1.3": - version: 4.1.6 - resolution: "@types/graceful-fs@npm:4.1.6" - dependencies: - "@types/node": "*" - checksum: c3070ccdc9ca0f40df747bced1c96c71a61992d6f7c767e8fd24bb6a3c2de26e8b84135ede000b7e79db530a23e7e88dcd9db60eee6395d0f4ce1dae91369dd4 - languageName: node - linkType: hard - "@types/gtag.js@npm:^0.0.12": version: 0.0.12 resolution: "@types/gtag.js@npm:0.0.12" @@ -3628,7 +3485,7 @@ __metadata: languageName: node linkType: hard -"@types/istanbul-lib-coverage@npm:*, @types/istanbul-lib-coverage@npm:^2.0.0, @types/istanbul-lib-coverage@npm:^2.0.1": +"@types/istanbul-lib-coverage@npm:*, @types/istanbul-lib-coverage@npm:^2.0.0": version: 2.0.4 resolution: "@types/istanbul-lib-coverage@npm:2.0.4" checksum: a25d7589ee65c94d31464c16b72a9dc81dfa0bea9d3e105ae03882d616e2a0712a9c101a599ec482d297c3591e16336962878cb3eb1a0a62d5b76d277a890ce7 @@ -4131,12 +3988,75 @@ __metadata: languageName: node linkType: hard -"@webassemblyjs/ast@npm:1.11.5, @webassemblyjs/ast@npm:^1.11.5": - version: 1.11.5 - resolution: "@webassemblyjs/ast@npm:1.11.5" +"@vitest/expect@npm:2.0.5": + version: 2.0.5 + resolution: "@vitest/expect@npm:2.0.5" dependencies: - "@webassemblyjs/helper-numbers": 1.11.5 - "@webassemblyjs/helper-wasm-bytecode": 1.11.5 + "@vitest/spy": 2.0.5 + "@vitest/utils": 2.0.5 + chai: ^5.1.1 + tinyrainbow: ^1.2.0 + checksum: 0c65eb24c2fd9ef5735d1e65dc8fee59936e6cab1d6ab24a95e014b8337be5598242fceae4e8ec2974e2ae70a30c1906ad41208bf6de6cdf2043594cdb65e627 + languageName: node + linkType: hard + +"@vitest/pretty-format@npm:2.0.5, @vitest/pretty-format@npm:^2.0.5": + version: 2.0.5 + resolution: "@vitest/pretty-format@npm:2.0.5" + dependencies: + tinyrainbow: ^1.2.0 + checksum: d60346001180e5bb3c53be4b4d0b6d9352648b066641d5aba7b97d7c97a8e252dc934204d58818330262a65f07127455fc5f3b5f7e3647c60f6ff302a725733b + languageName: node + linkType: hard + +"@vitest/runner@npm:2.0.5": + version: 2.0.5 + resolution: "@vitest/runner@npm:2.0.5" + dependencies: + "@vitest/utils": 2.0.5 + pathe: ^1.1.2 + checksum: 4d6c23ea77ada83d70cb8cfd20b17cd0b9a375bc70b95466acee822734e203952931319abf167abcdba33dca415affed71d98d3f7212e1812dbf81e540fae4a4 + languageName: node + linkType: hard + +"@vitest/snapshot@npm:2.0.5": + version: 2.0.5 + resolution: "@vitest/snapshot@npm:2.0.5" + dependencies: + "@vitest/pretty-format": 2.0.5 + magic-string: ^0.30.10 + pathe: ^1.1.2 + checksum: 468d040106aa186a63ff3a86ce6bf333d52de83a2d906dc8c7c5c63406f2ecb46850ac5d69f5838a15764094946963962fa963d64c62a1a8a127ba20496fa3f1 + languageName: node + linkType: hard + +"@vitest/spy@npm:2.0.5": + version: 2.0.5 + resolution: "@vitest/spy@npm:2.0.5" + dependencies: + tinyspy: ^3.0.0 + checksum: a010dec99146832a2586c639fccf533b194482f6f25ffb2d64367598a4e77d094aedd3d82cdb55fc1a3971649577a039513ccf8dc1571492e5982482c530c7b9 + languageName: node + linkType: hard + +"@vitest/utils@npm:2.0.5": + version: 2.0.5 + resolution: "@vitest/utils@npm:2.0.5" + dependencies: + "@vitest/pretty-format": 2.0.5 + estree-walker: ^3.0.3 + loupe: ^3.1.1 + tinyrainbow: ^1.2.0 + checksum: 6867556dd7e376437e454b96c7e596ec16e141fb00b002b6ce435611ab3d9d1e3f38ebf48b1fc49f4c97f9754ed37abb602de8bf122f4ac0de621a4dbe0a314e + languageName: node + linkType: hard + +"@webassemblyjs/ast@npm:1.11.5, @webassemblyjs/ast@npm:^1.11.5": + version: 1.11.5 + resolution: "@webassemblyjs/ast@npm:1.11.5" + dependencies: + "@webassemblyjs/helper-numbers": 1.11.5 + "@webassemblyjs/helper-wasm-bytecode": 1.11.5 checksum: 7df16d8d4364d40e2506776330f8114fddc6494e6e18e8d5ec386312a0881a564cef136b0a74cc4a6ba284e2ff6bad890ddc029a0ba6cf45cc15186e638db118 languageName: node linkType: hard @@ -4498,7 +4418,7 @@ __metadata: languageName: node linkType: hard -"ansi-escapes@npm:^4.2.1, ansi-escapes@npm:^4.3.2": +"ansi-escapes@npm:^4.3.2": version: 4.3.2 resolution: "ansi-escapes@npm:4.3.2" dependencies: @@ -4562,7 +4482,7 @@ __metadata: languageName: node linkType: hard -"anymatch@npm:^3.0.3, anymatch@npm:~3.1.2": +"anymatch@npm:~3.1.2": version: 3.1.3 resolution: "anymatch@npm:3.1.3" dependencies: @@ -4723,6 +4643,13 @@ __metadata: languageName: node linkType: hard +"assertion-error@npm:^2.0.1": + version: 2.0.1 + resolution: "assertion-error@npm:2.0.1" + checksum: a0789dd882211b87116e81e2648ccb7f60340b34f19877dd020b39ebb4714e475eb943e14ba3e22201c221ef6645b7bfe10297e76b6ac95b48a9898c1211ce66 + languageName: node + linkType: hard + "astring@npm:^1.8.0": version: 1.8.6 resolution: "astring@npm:1.8.6" @@ -4764,23 +4691,6 @@ __metadata: languageName: node linkType: hard -"babel-jest@npm:^29.7.0": - version: 29.7.0 - resolution: "babel-jest@npm:29.7.0" - dependencies: - "@jest/transform": ^29.7.0 - "@types/babel__core": ^7.1.14 - babel-plugin-istanbul: ^6.1.1 - babel-preset-jest: ^29.6.3 - chalk: ^4.0.0 - graceful-fs: ^4.2.9 - slash: ^3.0.0 - peerDependencies: - "@babel/core": ^7.8.0 - checksum: ee6f8e0495afee07cac5e4ee167be705c711a8cc8a737e05a587a131fdae2b3c8f9aa55dfd4d9c03009ac2d27f2de63d8ba96d3e8460da4d00e8af19ef9a83f7 - languageName: node - linkType: hard - "babel-loader@npm:^9.1.3": version: 9.1.3 resolution: "babel-loader@npm:9.1.3" @@ -4803,31 +4713,6 @@ __metadata: languageName: node linkType: hard -"babel-plugin-istanbul@npm:^6.1.1": - version: 6.1.1 - resolution: "babel-plugin-istanbul@npm:6.1.1" - dependencies: - "@babel/helper-plugin-utils": ^7.0.0 - "@istanbuljs/load-nyc-config": ^1.0.0 - "@istanbuljs/schema": ^0.1.2 - istanbul-lib-instrument: ^5.0.4 - test-exclude: ^6.0.0 - checksum: cb4fd95738219f232f0aece1116628cccff16db891713c4ccb501cddbbf9272951a5df81f2f2658dfdf4b3e7b236a9d5cbcf04d5d8c07dd5077297339598061a - languageName: node - linkType: hard - -"babel-plugin-jest-hoist@npm:^29.6.3": - version: 29.6.3 - resolution: "babel-plugin-jest-hoist@npm:29.6.3" - dependencies: - "@babel/template": ^7.3.3 - "@babel/types": ^7.3.3 - "@types/babel__core": ^7.1.14 - "@types/babel__traverse": ^7.0.6 - checksum: 51250f22815a7318f17214a9d44650ba89551e6d4f47a2dc259128428324b52f5a73979d010cefd921fd5a720d8c1d55ad74ff601cd94c7bd44d5f6292fde2d1 - languageName: node - linkType: hard - "babel-plugin-polyfill-corejs2@npm:^0.4.6": version: 0.4.6 resolution: "babel-plugin-polyfill-corejs2@npm:0.4.6" @@ -4864,40 +4749,6 @@ __metadata: languageName: node linkType: hard -"babel-preset-current-node-syntax@npm:^1.0.0": - version: 1.0.1 - resolution: "babel-preset-current-node-syntax@npm:1.0.1" - dependencies: - "@babel/plugin-syntax-async-generators": ^7.8.4 - "@babel/plugin-syntax-bigint": ^7.8.3 - "@babel/plugin-syntax-class-properties": ^7.8.3 - "@babel/plugin-syntax-import-meta": ^7.8.3 - "@babel/plugin-syntax-json-strings": ^7.8.3 - "@babel/plugin-syntax-logical-assignment-operators": ^7.8.3 - "@babel/plugin-syntax-nullish-coalescing-operator": ^7.8.3 - "@babel/plugin-syntax-numeric-separator": ^7.8.3 - "@babel/plugin-syntax-object-rest-spread": ^7.8.3 - "@babel/plugin-syntax-optional-catch-binding": ^7.8.3 - "@babel/plugin-syntax-optional-chaining": ^7.8.3 - "@babel/plugin-syntax-top-level-await": ^7.8.3 - peerDependencies: - "@babel/core": ^7.0.0 - checksum: d118c2742498c5492c095bc8541f4076b253e705b5f1ad9a2e7d302d81a84866f0070346662355c8e25fc02caa28dc2da8d69bcd67794a0d60c4d6fab6913cc8 - languageName: node - linkType: hard - -"babel-preset-jest@npm:^29.6.3": - version: 29.6.3 - resolution: "babel-preset-jest@npm:29.6.3" - dependencies: - babel-plugin-jest-hoist: ^29.6.3 - babel-preset-current-node-syntax: ^1.0.0 - peerDependencies: - "@babel/core": ^7.0.0 - checksum: aa4ff2a8a728d9d698ed521e3461a109a1e66202b13d3494e41eea30729a5e7cc03b3a2d56c594423a135429c37bf63a9fa8b0b9ce275298be3095a88c69f6fb - languageName: node - linkType: hard - "bail@npm:^2.0.0": version: 2.0.2 resolution: "bail@npm:2.0.2" @@ -5082,24 +4933,6 @@ __metadata: languageName: node linkType: hard -"bs-logger@npm:0.x": - version: 0.2.6 - resolution: "bs-logger@npm:0.2.6" - dependencies: - fast-json-stable-stringify: 2.x - checksum: d34bdaf68c64bd099ab97c3ea608c9ae7d3f5faa1178b3f3f345acd94e852e608b2d4f9103fb2e503f5e69780e98293df41691b84be909b41cf5045374d54606 - languageName: node - linkType: hard - -"bser@npm:2.1.1": - version: 2.1.1 - resolution: "bser@npm:2.1.1" - dependencies: - node-int64: ^0.4.0 - checksum: 9ba4dc58ce86300c862bffc3ae91f00b2a03b01ee07f3564beeeaf82aa243b8b03ba53f123b0b842c190d4399b94697970c8e7cf7b1ea44b61aa28c3526a4449 - languageName: node - linkType: hard - "buffer-from@npm:^1.0.0": version: 1.1.2 resolution: "buffer-from@npm:1.1.2" @@ -5138,6 +4971,13 @@ __metadata: languageName: node linkType: hard +"cac@npm:^6.7.14": + version: 6.7.14 + resolution: "cac@npm:6.7.14" + checksum: 45a2496a9443abbe7f52a49b22fbe51b1905eff46e03fd5e6c98e3f85077be3f8949685a1849b1a9cd2bc3e5567dfebcf64f01ce01847baf918f1b37c839791a + languageName: node + linkType: hard + "cacache@npm:^16.1.0": version: 16.1.3 resolution: "cacache@npm:16.1.3" @@ -5213,13 +5053,6 @@ __metadata: languageName: node linkType: hard -"camelcase@npm:^5.3.1": - version: 5.3.1 - resolution: "camelcase@npm:5.3.1" - checksum: e6effce26b9404e3c0f301498184f243811c30dfe6d0b9051863bd8e4034d09c8c2923794f280d6827e5aa055f6c434115ff97864a16a963366fb35fd673024b - languageName: node - linkType: hard - "camelcase@npm:^6.2.0": version: 6.3.0 resolution: "camelcase@npm:6.3.0" @@ -5260,6 +5093,19 @@ __metadata: languageName: node linkType: hard +"chai@npm:^5.1.1": + version: 5.1.1 + resolution: "chai@npm:5.1.1" + dependencies: + assertion-error: ^2.0.1 + check-error: ^2.1.1 + deep-eql: ^5.0.1 + loupe: ^3.1.0 + pathval: ^2.0.0 + checksum: 1e0a5e1b5febdfa8ceb97b9aff608286861ecb86533863119b2f39f07c08fb59f3c1791ab554947f009b9d71d509b9e4e734fb12133cb81f231c2c2ee7c1e738 + languageName: node + linkType: hard + "chalk@npm:^2.4.2": version: 2.4.2 resolution: "chalk@npm:2.4.2" @@ -5330,6 +5176,13 @@ __metadata: languageName: node linkType: hard +"check-error@npm:^2.1.1": + version: 2.1.1 + resolution: "check-error@npm:2.1.1" + checksum: d785ed17b1d4a4796b6e75c765a9a290098cf52ff9728ce0756e8ffd4293d2e419dd30c67200aee34202463b474306913f2fcfaf1890641026d9fc6966fea27a + languageName: node + linkType: hard + "cheerio-select@npm:^2.1.0": version: 2.1.0 resolution: "cheerio-select@npm:2.1.0" @@ -5399,13 +5252,6 @@ __metadata: languageName: node linkType: hard -"cjs-module-lexer@npm:^1.0.0": - version: 1.2.2 - resolution: "cjs-module-lexer@npm:1.2.2" - checksum: 977f3f042bd4f08e368c890d91eecfbc4f91da0bc009a3c557bc4dfbf32022ad1141244ac1178d44de70fc9f3dea7add7cd9a658a34b9fae98a55d8f92331ce5 - languageName: node - linkType: hard - "clean-css@npm:^5.2.2, clean-css@npm:^5.3.2, clean-css@npm:~5.3.2": version: 5.3.3 resolution: "clean-css@npm:5.3.3" @@ -5508,13 +5354,6 @@ __metadata: languageName: node linkType: hard -"co@npm:^4.6.0": - version: 4.6.0 - resolution: "co@npm:4.6.0" - checksum: 5210d9223010eb95b29df06a91116f2cf7c8e0748a9013ed853b53f362ea0e822f1e5bb054fb3cefc645239a4cf966af1f6133a3b43f40d591f3b68ed6cf0510 - languageName: node - linkType: hard - "collapse-white-space@npm:^2.0.0": version: 2.1.0 resolution: "collapse-white-space@npm:2.1.0" @@ -5522,13 +5361,6 @@ __metadata: languageName: node linkType: hard -"collect-v8-coverage@npm:^1.0.0": - version: 1.0.1 - resolution: "collect-v8-coverage@npm:1.0.1" - checksum: 4efe0a1fccd517b65478a2364b33dadd0a43fc92a56f59aaece9b6186fe5177b2de471253587de7c91516f07c7268c2f6770b6cbcffc0e0ece353b766ec87e55 - languageName: node - linkType: hard - "color-convert@npm:^1.9.0": version: 1.9.3 resolution: "color-convert@npm:1.9.3" @@ -5766,13 +5598,6 @@ __metadata: languageName: node linkType: hard -"convert-source-map@npm:^1.6.0": - version: 1.9.0 - resolution: "convert-source-map@npm:1.9.0" - checksum: dc55a1f28ddd0e9485ef13565f8f756b342f9a46c4ae18b843fe3c30c675d058d6a4823eff86d472f187b176f0adf51ea7b69ea38be34be4a63cbbf91b0593c8 - languageName: node - linkType: hard - "convert-source-map@npm:^2.0.0": version: 2.0.0 resolution: "convert-source-map@npm:2.0.0" @@ -5877,23 +5702,6 @@ __metadata: languageName: node linkType: hard -"create-jest@npm:^29.7.0": - version: 29.7.0 - resolution: "create-jest@npm:29.7.0" - dependencies: - "@jest/types": ^29.6.3 - chalk: ^4.0.0 - exit: ^0.1.2 - graceful-fs: ^4.2.9 - jest-config: ^29.7.0 - jest-util: ^29.7.0 - prompts: ^2.0.1 - bin: - create-jest: bin/create-jest.js - checksum: 1427d49458adcd88547ef6fa39041e1fe9033a661293aa8d2c3aa1b4967cb5bf4f0c00436c7a61816558f28ba2ba81a94d5c962e8022ea9a883978fc8e1f2945 - languageName: node - linkType: hard - "cross-spawn@npm:^7.0.0, cross-spawn@npm:^7.0.1, cross-spawn@npm:^7.0.2, cross-spawn@npm:^7.0.3": version: 7.0.3 resolution: "cross-spawn@npm:7.0.3" @@ -6160,15 +5968,15 @@ __metadata: languageName: node linkType: hard -"debug@npm:4, debug@npm:^4.0.0, debug@npm:^4.1.0, debug@npm:^4.1.1, debug@npm:^4.2.0, debug@npm:^4.3.1, debug@npm:^4.3.2, debug@npm:^4.3.3, debug@npm:^4.3.4": - version: 4.3.5 - resolution: "debug@npm:4.3.5" +"debug@npm:4, debug@npm:^4.0.0, debug@npm:^4.1.0, debug@npm:^4.1.1, debug@npm:^4.2.0, debug@npm:^4.3.1, debug@npm:^4.3.2, debug@npm:^4.3.3, debug@npm:^4.3.4, debug@npm:^4.3.5": + version: 4.3.6 + resolution: "debug@npm:4.3.6" dependencies: ms: 2.1.2 peerDependenciesMeta: supports-color: optional: true - checksum: 7c002b51e256257f936dda09eb37167df952758c57badf6bf44bdc40b89a4bcb8e5a0a2e4c7b53f97c69e2970dd5272d33a757378a12c8f8e64ea7bf99e8e86e + checksum: 1630b748dea3c581295e02137a9f5cbe2c1d85fea35c1e6597a65ca2b16a6fce68cec61b299d480787ef310ba927dc8c92d3061faba0ad06c6a724672f66be7f languageName: node linkType: hard @@ -6199,15 +6007,10 @@ __metadata: languageName: node linkType: hard -"dedent@npm:^1.0.0": - version: 1.5.1 - resolution: "dedent@npm:1.5.1" - peerDependencies: - babel-plugin-macros: ^3.1.0 - peerDependenciesMeta: - babel-plugin-macros: - optional: true - checksum: c3c300a14edf1bdf5a873f9e4b22e839d62490bc5c8d6169c1f15858a1a76733d06a9a56930e963d677a2ceeca4b6b0894cc5ea2f501aa382ca5b92af3413c2a +"deep-eql@npm:^5.0.1": + version: 5.0.2 + resolution: "deep-eql@npm:5.0.2" + checksum: 6aaaadb4c19cbce42e26b2bbe5bd92875f599d2602635dc97f0294bae48da79e89470aedee05f449e0ca8c65e9fd7e7872624d1933a1db02713d99c2ca8d1f24 languageName: node linkType: hard @@ -6325,13 +6128,6 @@ __metadata: languageName: node linkType: hard -"detect-newline@npm:^3.0.0": - version: 3.1.0 - resolution: "detect-newline@npm:3.1.0" - checksum: ae6cd429c41ad01b164c59ea36f264a2c479598e61cba7c99da24175a7ab80ddf066420f2bec9a1c57a6bead411b4655ff15ad7d281c000a89791f48cbe939e7 - languageName: node - linkType: hard - "detect-node@npm:^2.0.4": version: 2.1.0 resolution: "detect-node@npm:2.1.0" @@ -6556,13 +6352,6 @@ __metadata: languageName: node linkType: hard -"emittery@npm:^0.13.1": - version: 0.13.1 - resolution: "emittery@npm:0.13.1" - checksum: 2b089ab6306f38feaabf4f6f02792f9ec85fc054fda79f44f6790e61bbf6bc4e1616afb9b232e0c5ec5289a8a452f79bfa6d905a6fd64e94b49981f0934001c6 - languageName: node - linkType: hard - "emoji-regex@npm:^8.0.0": version: 8.0.0 resolution: "emoji-regex@npm:8.0.0" @@ -6755,6 +6544,86 @@ __metadata: languageName: node linkType: hard +"esbuild@npm:^0.21.3": + version: 0.21.5 + resolution: "esbuild@npm:0.21.5" + dependencies: + "@esbuild/aix-ppc64": 0.21.5 + "@esbuild/android-arm": 0.21.5 + "@esbuild/android-arm64": 0.21.5 + "@esbuild/android-x64": 0.21.5 + "@esbuild/darwin-arm64": 0.21.5 + "@esbuild/darwin-x64": 0.21.5 + "@esbuild/freebsd-arm64": 0.21.5 + "@esbuild/freebsd-x64": 0.21.5 + "@esbuild/linux-arm": 0.21.5 + "@esbuild/linux-arm64": 0.21.5 + "@esbuild/linux-ia32": 0.21.5 + "@esbuild/linux-loong64": 0.21.5 + "@esbuild/linux-mips64el": 0.21.5 + "@esbuild/linux-ppc64": 0.21.5 + "@esbuild/linux-riscv64": 0.21.5 + "@esbuild/linux-s390x": 0.21.5 + "@esbuild/linux-x64": 0.21.5 + "@esbuild/netbsd-x64": 0.21.5 + "@esbuild/openbsd-x64": 0.21.5 + "@esbuild/sunos-x64": 0.21.5 + "@esbuild/win32-arm64": 0.21.5 + "@esbuild/win32-ia32": 0.21.5 + "@esbuild/win32-x64": 0.21.5 + dependenciesMeta: + "@esbuild/aix-ppc64": + optional: true + "@esbuild/android-arm": + optional: true + "@esbuild/android-arm64": + optional: true + "@esbuild/android-x64": + optional: true + "@esbuild/darwin-arm64": + optional: true + "@esbuild/darwin-x64": + optional: true + "@esbuild/freebsd-arm64": + optional: true + "@esbuild/freebsd-x64": + optional: true + "@esbuild/linux-arm": + optional: true + "@esbuild/linux-arm64": + optional: true + "@esbuild/linux-ia32": + optional: true + "@esbuild/linux-loong64": + optional: true + "@esbuild/linux-mips64el": + optional: true + "@esbuild/linux-ppc64": + optional: true + "@esbuild/linux-riscv64": + optional: true + "@esbuild/linux-s390x": + optional: true + "@esbuild/linux-x64": + optional: true + "@esbuild/netbsd-x64": + optional: true + "@esbuild/openbsd-x64": + optional: true + "@esbuild/sunos-x64": + optional: true + "@esbuild/win32-arm64": + optional: true + "@esbuild/win32-ia32": + optional: true + "@esbuild/win32-x64": + optional: true + bin: + esbuild: bin/esbuild + checksum: 2911c7b50b23a9df59a7d6d4cdd3a4f85855787f374dce751148dbb13305e0ce7e880dde1608c2ab7a927fc6cec3587b80995f7fc87a64b455f8b70b55fd8ec1 + languageName: node + linkType: hard + "escalade@npm:^3.1.1": version: 3.1.1 resolution: "escalade@npm:3.1.1" @@ -7119,7 +6988,7 @@ __metadata: languageName: node linkType: hard -"estree-walker@npm:^3.0.0": +"estree-walker@npm:^3.0.0, estree-walker@npm:^3.0.3": version: 3.0.3 resolution: "estree-walker@npm:3.0.3" dependencies: @@ -7207,14 +7076,24 @@ __metadata: languageName: node linkType: hard -"exit@npm:^0.1.2": - version: 0.1.2 - resolution: "exit@npm:0.1.2" - checksum: abc407f07a875c3961e4781dfcb743b58d6c93de9ab263f4f8c9d23bb6da5f9b7764fc773f86b43dd88030444d5ab8abcb611cb680fba8ca075362b77114bba3 +"execa@npm:^8.0.1": + version: 8.0.1 + resolution: "execa@npm:8.0.1" + dependencies: + cross-spawn: ^7.0.3 + get-stream: ^8.0.1 + human-signals: ^5.0.0 + is-stream: ^3.0.0 + merge-stream: ^2.0.0 + npm-run-path: ^5.1.0 + onetime: ^6.0.0 + signal-exit: ^4.1.0 + strip-final-newline: ^3.0.0 + checksum: cac1bf86589d1d9b73bdc5dda65c52012d1a9619c44c526891956745f7b366ca2603d29fe3f7460bacc2b48c6eab5d6a4f7afe0534b31473d3708d1265545e1f languageName: node linkType: hard -"expect@npm:^29.0.0, expect@npm:^29.7.0": +"expect@npm:^29.0.0": version: 29.7.0 resolution: "expect@npm:29.7.0" dependencies: @@ -7313,7 +7192,7 @@ __metadata: languageName: node linkType: hard -"fast-json-stable-stringify@npm:2.x, fast-json-stable-stringify@npm:^2.0.0, fast-json-stable-stringify@npm:^2.1.0": +"fast-json-stable-stringify@npm:^2.0.0": version: 2.1.0 resolution: "fast-json-stable-stringify@npm:2.1.0" checksum: b191531e36c607977e5b1c47811158733c34ccb3bfde92c44798929e9b4154884378536d26ad90dfecd32e1ffc09c545d23535ad91b3161a27ddbb8ebe0cbecb @@ -7363,15 +7242,6 @@ __metadata: languageName: node linkType: hard -"fb-watchman@npm:^2.0.0": - version: 2.0.2 - resolution: "fb-watchman@npm:2.0.2" - dependencies: - bser: 2.1.1 - checksum: b15a124cef28916fe07b400eb87cbc73ca082c142abf7ca8e8de6af43eca79ca7bd13eb4d4d48240b3bd3136eaac40d16e42d6edf87a8e5d1dd8070626860c78 - languageName: node - linkType: hard - "feed@npm:^4.2.2": version: 4.2.2 resolution: "feed@npm:4.2.2" @@ -7462,7 +7332,7 @@ __metadata: languageName: node linkType: hard -"find-up@npm:^4.0.0, find-up@npm:^4.1.0": +"find-up@npm:^4.1.0": version: 4.1.0 resolution: "find-up@npm:4.1.0" dependencies: @@ -7670,19 +7540,19 @@ __metadata: languageName: node linkType: hard -"fsevents@npm:^2.3.2, fsevents@npm:~2.3.2": - version: 2.3.2 - resolution: "fsevents@npm:2.3.2" +"fsevents@npm:~2.3.2, fsevents@npm:~2.3.3": + version: 2.3.3 + resolution: "fsevents@npm:2.3.3" dependencies: node-gyp: latest - checksum: 97ade64e75091afee5265e6956cb72ba34db7819b4c3e94c431d4be2b19b8bb7a2d4116da417950c3425f17c8fe693d25e20212cac583ac1521ad066b77ae31f + checksum: 11e6ea6fea15e42461fc55b4b0e4a0a3c654faa567f1877dbd353f39156f69def97a69936d1746619d656c4b93de2238bf731f6085a03a50cabf287c9d024317 conditions: os=darwin languageName: node linkType: hard -"fsevents@patch:fsevents@^2.3.2#~builtin, fsevents@patch:fsevents@~2.3.2#~builtin": - version: 2.3.2 - resolution: "fsevents@patch:fsevents@npm%3A2.3.2#~builtin::version=2.3.2&hash=df0bf1" +"fsevents@patch:fsevents@~2.3.2#~builtin, fsevents@patch:fsevents@~2.3.3#~builtin": + version: 2.3.3 + resolution: "fsevents@patch:fsevents@npm%3A2.3.3#~builtin::version=2.3.3&hash=df0bf1" dependencies: node-gyp: latest conditions: os=darwin @@ -7745,6 +7615,13 @@ __metadata: languageName: node linkType: hard +"get-func-name@npm:^2.0.1": + version: 2.0.2 + resolution: "get-func-name@npm:2.0.2" + checksum: 3f62f4c23647de9d46e6f76d2b3eafe58933a9b3830c60669e4180d6c601ce1b4aa310ba8366143f55e52b139f992087a9f0647274e8745621fa2af7e0acf13b + languageName: node + linkType: hard + "get-intrinsic@npm:^1.0.2, get-intrinsic@npm:^1.1.1, get-intrinsic@npm:^1.1.3, get-intrinsic@npm:^1.2.0, get-intrinsic@npm:^1.2.1": version: 1.2.1 resolution: "get-intrinsic@npm:1.2.1" @@ -7764,13 +7641,6 @@ __metadata: languageName: node linkType: hard -"get-package-type@npm:^0.1.0": - version: 0.1.0 - resolution: "get-package-type@npm:0.1.0" - checksum: bba0811116d11e56d702682ddef7c73ba3481f114590e705fc549f4d868972263896af313c57a25c076e3c0d567e11d919a64ba1b30c879be985fc9d44f96148 - languageName: node - linkType: hard - "get-stream@npm:^5.0.0": version: 5.2.0 resolution: "get-stream@npm:5.2.0" @@ -7787,6 +7657,13 @@ __metadata: languageName: node linkType: hard +"get-stream@npm:^8.0.1": + version: 8.0.1 + resolution: "get-stream@npm:8.0.1" + checksum: 01e3d3cf29e1393f05f44d2f00445c5f9ec3d1c49e8179b31795484b9c117f4c695e5e07b88b50785d5c8248a788c85d9913a79266fc77e3ef11f78f10f1b974 + languageName: node + linkType: hard + "get-symbol-description@npm:^1.0.0": version: 1.0.0 resolution: "get-symbol-description@npm:1.0.0" @@ -7959,6 +7836,13 @@ __metadata: languageName: node linkType: hard +"globrex@npm:^0.1.2": + version: 0.1.2 + resolution: "globrex@npm:0.1.2" + checksum: adca162494a176ce9ecf4dd232f7b802956bb1966b37f60c15e49d2e7d961b66c60826366dc2649093cad5a0d69970cfa8875bd1695b5a1a2f33dcd2aa88da3c + languageName: node + linkType: hard + "gopd@npm:^1.0.1": version: 1.0.1 resolution: "gopd@npm:1.0.1" @@ -8309,7 +8193,7 @@ __metadata: languageName: node linkType: hard -"html-escaper@npm:^2.0.0, html-escaper@npm:^2.0.2": +"html-escaper@npm:^2.0.2": version: 2.0.2 resolution: "html-escaper@npm:2.0.2" checksum: d2df2da3ad40ca9ee3a39c5cc6475ef67c8f83c234475f24d8e9ce0dc80a2c82df8e1d6fa78ddd1e9022a586ea1bd247a615e80a5cd9273d90111ddda7d9e974 @@ -8523,6 +8407,13 @@ __metadata: languageName: node linkType: hard +"human-signals@npm:^5.0.0": + version: 5.0.0 + resolution: "human-signals@npm:5.0.0" + checksum: 6504560d5ed91444f16bea3bd9dfc66110a339442084e56c3e7fa7bbdf3f406426d6563d662bdce67064b165eac31eeabfc0857ed170aaa612cf14ec9f9a464c + languageName: node + linkType: hard + "humanize-ms@npm:^1.2.1": version: 1.2.1 resolution: "humanize-ms@npm:1.2.1" @@ -8624,18 +8515,6 @@ __metadata: languageName: node linkType: hard -"import-local@npm:^3.0.2": - version: 3.1.0 - resolution: "import-local@npm:3.1.0" - dependencies: - pkg-dir: ^4.2.0 - resolve-cwd: ^3.0.0 - bin: - import-local-fixture: fixtures/cli.js - checksum: bfcdb63b5e3c0e245e347f3107564035b128a414c4da1172a20dc67db2504e05ede4ac2eee1252359f78b0bfd7b19ef180aec427c2fce6493ae782d73a04cddd - languageName: node - linkType: hard - "imurmurhash@npm:^0.1.4": version: 0.1.4 resolution: "imurmurhash@npm:0.1.4" @@ -8932,13 +8811,6 @@ __metadata: languageName: node linkType: hard -"is-generator-fn@npm:^2.0.0": - version: 2.1.0 - resolution: "is-generator-fn@npm:2.1.0" - checksum: a6ad5492cf9d1746f73b6744e0c43c0020510b59d56ddcb78a91cbc173f09b5e6beff53d75c9c5a29feb618bfef2bf458e025ecf3a57ad2268e2fb2569f56215 - languageName: node - linkType: hard - "is-glob@npm:^4.0.0, is-glob@npm:^4.0.1, is-glob@npm:^4.0.3, is-glob@npm:~4.0.1": version: 4.0.3 resolution: "is-glob@npm:4.0.3" @@ -9123,6 +8995,13 @@ __metadata: languageName: node linkType: hard +"is-stream@npm:^3.0.0": + version: 3.0.0 + resolution: "is-stream@npm:3.0.0" + checksum: 172093fe99119ffd07611ab6d1bcccfe8bc4aa80d864b15f43e63e54b7abc71e779acd69afdb854c4e2a67fdc16ae710e370eda40088d1cfc956a50ed82d8f16 + languageName: node + linkType: hard + "is-string@npm:^1.0.5, is-string@npm:^1.0.7": version: 1.0.7 resolution: "is-string@npm:1.0.7" @@ -9242,71 +9121,6 @@ __metadata: languageName: node linkType: hard -"istanbul-lib-coverage@npm:^3.0.0, istanbul-lib-coverage@npm:^3.2.0": - version: 3.2.0 - resolution: "istanbul-lib-coverage@npm:3.2.0" - checksum: a2a545033b9d56da04a8571ed05c8120bf10e9bce01cf8633a3a2b0d1d83dff4ac4fe78d6d5673c27fc29b7f21a41d75f83a36be09f82a61c367b56aa73c1ff9 - languageName: node - linkType: hard - -"istanbul-lib-instrument@npm:^5.0.4": - version: 5.2.1 - resolution: "istanbul-lib-instrument@npm:5.2.1" - dependencies: - "@babel/core": ^7.12.3 - "@babel/parser": ^7.14.7 - "@istanbuljs/schema": ^0.1.2 - istanbul-lib-coverage: ^3.2.0 - semver: ^6.3.0 - checksum: bf16f1803ba5e51b28bbd49ed955a736488381e09375d830e42ddeb403855b2006f850711d95ad726f2ba3f1ae8e7366de7e51d2b9ac67dc4d80191ef7ddf272 - languageName: node - linkType: hard - -"istanbul-lib-instrument@npm:^6.0.0": - version: 6.0.0 - resolution: "istanbul-lib-instrument@npm:6.0.0" - dependencies: - "@babel/core": ^7.12.3 - "@babel/parser": ^7.14.7 - "@istanbuljs/schema": ^0.1.2 - istanbul-lib-coverage: ^3.2.0 - semver: ^7.5.4 - checksum: b9dc3723a769e65dbe1b912f935088ffc07cf393fa78a3ce79022c91aabb0ad01405ffd56083cdd822e514798e9daae3ea7bfe85633b094ecb335d28eb0a3f97 - languageName: node - linkType: hard - -"istanbul-lib-report@npm:^3.0.0": - version: 3.0.0 - resolution: "istanbul-lib-report@npm:3.0.0" - dependencies: - istanbul-lib-coverage: ^3.0.0 - make-dir: ^3.0.0 - supports-color: ^7.1.0 - checksum: 3f29eb3f53c59b987386e07fe772d24c7f58c6897f34c9d7a296f4000de7ae3de9eb95c3de3df91dc65b134c84dee35c54eee572a56243e8907c48064e34ff1b - languageName: node - linkType: hard - -"istanbul-lib-source-maps@npm:^4.0.0": - version: 4.0.1 - resolution: "istanbul-lib-source-maps@npm:4.0.1" - dependencies: - debug: ^4.1.1 - istanbul-lib-coverage: ^3.0.0 - source-map: ^0.6.1 - checksum: 21ad3df45db4b81852b662b8d4161f6446cd250c1ddc70ef96a585e2e85c26ed7cd9c2a396a71533cfb981d1a645508bc9618cae431e55d01a0628e7dec62ef2 - languageName: node - linkType: hard - -"istanbul-reports@npm:^3.1.3": - version: 3.1.5 - resolution: "istanbul-reports@npm:3.1.5" - dependencies: - html-escaper: ^2.0.0 - istanbul-lib-report: ^3.0.0 - checksum: 7867228f83ed39477b188ea07e7ccb9b4f5320b6f73d1db93a0981b7414fa4ef72d3f80c4692c442f90fc250d9406e71d8d7ab65bb615cb334e6292b73192b89 - languageName: node - linkType: hard - "jackspeak@npm:^2.3.5": version: 2.3.6 resolution: "jackspeak@npm:2.3.6" @@ -9320,109 +9134,6 @@ __metadata: languageName: node linkType: hard -"jest-changed-files@npm:^29.7.0": - version: 29.7.0 - resolution: "jest-changed-files@npm:29.7.0" - dependencies: - execa: ^5.0.0 - jest-util: ^29.7.0 - p-limit: ^3.1.0 - checksum: 963e203893c396c5dfc75e00a49426688efea7361b0f0e040035809cecd2d46b3c01c02be2d9e8d38b1138357d2de7719ea5b5be21f66c10f2e9685a5a73bb99 - languageName: node - linkType: hard - -"jest-circus@npm:^29.7.0": - version: 29.7.0 - resolution: "jest-circus@npm:29.7.0" - dependencies: - "@jest/environment": ^29.7.0 - "@jest/expect": ^29.7.0 - "@jest/test-result": ^29.7.0 - "@jest/types": ^29.6.3 - "@types/node": "*" - chalk: ^4.0.0 - co: ^4.6.0 - dedent: ^1.0.0 - is-generator-fn: ^2.0.0 - jest-each: ^29.7.0 - jest-matcher-utils: ^29.7.0 - jest-message-util: ^29.7.0 - jest-runtime: ^29.7.0 - jest-snapshot: ^29.7.0 - jest-util: ^29.7.0 - p-limit: ^3.1.0 - pretty-format: ^29.7.0 - pure-rand: ^6.0.0 - slash: ^3.0.0 - stack-utils: ^2.0.3 - checksum: 349437148924a5a109c9b8aad6d393a9591b4dac1918fc97d81b7fc515bc905af9918495055071404af1fab4e48e4b04ac3593477b1d5dcf48c4e71b527c70a7 - languageName: node - linkType: hard - -"jest-cli@npm:^29.7.0": - version: 29.7.0 - resolution: "jest-cli@npm:29.7.0" - dependencies: - "@jest/core": ^29.7.0 - "@jest/test-result": ^29.7.0 - "@jest/types": ^29.6.3 - chalk: ^4.0.0 - create-jest: ^29.7.0 - exit: ^0.1.2 - import-local: ^3.0.2 - jest-config: ^29.7.0 - jest-util: ^29.7.0 - jest-validate: ^29.7.0 - yargs: ^17.3.1 - peerDependencies: - node-notifier: ^8.0.1 || ^9.0.0 || ^10.0.0 - peerDependenciesMeta: - node-notifier: - optional: true - bin: - jest: bin/jest.js - checksum: 664901277a3f5007ea4870632ed6e7889db9da35b2434e7cb488443e6bf5513889b344b7fddf15112135495b9875892b156faeb2d7391ddb9e2a849dcb7b6c36 - languageName: node - linkType: hard - -"jest-config@npm:^29.7.0": - version: 29.7.0 - resolution: "jest-config@npm:29.7.0" - dependencies: - "@babel/core": ^7.11.6 - "@jest/test-sequencer": ^29.7.0 - "@jest/types": ^29.6.3 - babel-jest: ^29.7.0 - chalk: ^4.0.0 - ci-info: ^3.2.0 - deepmerge: ^4.2.2 - glob: ^7.1.3 - graceful-fs: ^4.2.9 - jest-circus: ^29.7.0 - jest-environment-node: ^29.7.0 - jest-get-type: ^29.6.3 - jest-regex-util: ^29.6.3 - jest-resolve: ^29.7.0 - jest-runner: ^29.7.0 - jest-util: ^29.7.0 - jest-validate: ^29.7.0 - micromatch: ^4.0.4 - parse-json: ^5.2.0 - pretty-format: ^29.7.0 - slash: ^3.0.0 - strip-json-comments: ^3.1.1 - peerDependencies: - "@types/node": "*" - ts-node: ">=9.0.0" - peerDependenciesMeta: - "@types/node": - optional: true - ts-node: - optional: true - checksum: 4cabf8f894c180cac80b7df1038912a3fc88f96f2622de33832f4b3314f83e22b08fb751da570c0ab2b7988f21604bdabade95e3c0c041068ac578c085cf7dff - languageName: node - linkType: hard - "jest-diff@npm:^29.7.0": version: 29.7.0 resolution: "jest-diff@npm:29.7.0" @@ -9435,42 +9146,6 @@ __metadata: languageName: node linkType: hard -"jest-docblock@npm:^29.7.0": - version: 29.7.0 - resolution: "jest-docblock@npm:29.7.0" - dependencies: - detect-newline: ^3.0.0 - checksum: 66390c3e9451f8d96c5da62f577a1dad701180cfa9b071c5025acab2f94d7a3efc2515cfa1654ebe707213241541ce9c5530232cdc8017c91ed64eea1bd3b192 - languageName: node - linkType: hard - -"jest-each@npm:^29.7.0": - version: 29.7.0 - resolution: "jest-each@npm:29.7.0" - dependencies: - "@jest/types": ^29.6.3 - chalk: ^4.0.0 - jest-get-type: ^29.6.3 - jest-util: ^29.7.0 - pretty-format: ^29.7.0 - checksum: e88f99f0184000fc8813f2a0aa79e29deeb63700a3b9b7928b8a418d7d93cd24933608591dbbdea732b473eb2021c72991b5cc51a17966842841c6e28e6f691c - languageName: node - linkType: hard - -"jest-environment-node@npm:^29.7.0": - version: 29.7.0 - resolution: "jest-environment-node@npm:29.7.0" - dependencies: - "@jest/environment": ^29.7.0 - "@jest/fake-timers": ^29.7.0 - "@jest/types": ^29.6.3 - "@types/node": "*" - jest-mock: ^29.7.0 - jest-util: ^29.7.0 - checksum: 501a9966292cbe0ca3f40057a37587cb6def25e1e0c5e39ac6c650fe78d3c70a2428304341d084ac0cced5041483acef41c477abac47e9a290d5545fd2f15646 - languageName: node - linkType: hard - "jest-get-type@npm:^29.6.3": version: 29.6.3 resolution: "jest-get-type@npm:29.6.3" @@ -9478,39 +9153,6 @@ __metadata: languageName: node linkType: hard -"jest-haste-map@npm:^29.7.0": - version: 29.7.0 - resolution: "jest-haste-map@npm:29.7.0" - dependencies: - "@jest/types": ^29.6.3 - "@types/graceful-fs": ^4.1.3 - "@types/node": "*" - anymatch: ^3.0.3 - fb-watchman: ^2.0.0 - fsevents: ^2.3.2 - graceful-fs: ^4.2.9 - jest-regex-util: ^29.6.3 - jest-util: ^29.7.0 - jest-worker: ^29.7.0 - micromatch: ^4.0.4 - walker: ^1.0.8 - dependenciesMeta: - fsevents: - optional: true - checksum: c2c8f2d3e792a963940fbdfa563ce14ef9e14d4d86da645b96d3cd346b8d35c5ce0b992ee08593939b5f718cf0a1f5a90011a056548a1dbf58397d4356786f01 - languageName: node - linkType: hard - -"jest-leak-detector@npm:^29.7.0": - version: 29.7.0 - resolution: "jest-leak-detector@npm:29.7.0" - dependencies: - jest-get-type: ^29.6.3 - pretty-format: ^29.7.0 - checksum: e3950e3ddd71e1d0c22924c51a300a1c2db6cf69ec1e51f95ccf424bcc070f78664813bef7aed4b16b96dfbdeea53fe358f8aeaaea84346ae15c3735758f1605 - languageName: node - linkType: hard - "jest-matcher-utils@npm:^29.7.0": version: 29.7.0 resolution: "jest-matcher-utils@npm:29.7.0" @@ -9527,204 +9169,30 @@ __metadata: version: 29.7.0 resolution: "jest-message-util@npm:29.7.0" dependencies: - "@babel/code-frame": ^7.12.13 - "@jest/types": ^29.6.3 - "@types/stack-utils": ^2.0.0 - chalk: ^4.0.0 - graceful-fs: ^4.2.9 - micromatch: ^4.0.4 - pretty-format: ^29.7.0 - slash: ^3.0.0 - stack-utils: ^2.0.3 - checksum: a9d025b1c6726a2ff17d54cc694de088b0489456c69106be6b615db7a51b7beb66788bea7a59991a019d924fbf20f67d085a445aedb9a4d6760363f4d7d09930 - languageName: node - linkType: hard - -"jest-mock@npm:^29.7.0": - version: 29.7.0 - resolution: "jest-mock@npm:29.7.0" - dependencies: - "@jest/types": ^29.6.3 - "@types/node": "*" - jest-util: ^29.7.0 - checksum: 81ba9b68689a60be1482212878973700347cb72833c5e5af09895882b9eb5c4e02843a1bbdf23f94c52d42708bab53a30c45a3482952c9eec173d1eaac5b86c5 - languageName: node - linkType: hard - -"jest-pnp-resolver@npm:^1.2.2": - version: 1.2.3 - resolution: "jest-pnp-resolver@npm:1.2.3" - peerDependencies: - jest-resolve: "*" - peerDependenciesMeta: - jest-resolve: - optional: true - checksum: db1a8ab2cb97ca19c01b1cfa9a9c8c69a143fde833c14df1fab0766f411b1148ff0df878adea09007ac6a2085ec116ba9a996a6ad104b1e58c20adbf88eed9b2 - languageName: node - linkType: hard - -"jest-regex-util@npm:^29.6.3": - version: 29.6.3 - resolution: "jest-regex-util@npm:29.6.3" - checksum: 0518beeb9bf1228261695e54f0feaad3606df26a19764bc19541e0fc6e2a3737191904607fb72f3f2ce85d9c16b28df79b7b1ec9443aa08c3ef0e9efda6f8f2a - languageName: node - linkType: hard - -"jest-resolve-dependencies@npm:^29.7.0": - version: 29.7.0 - resolution: "jest-resolve-dependencies@npm:29.7.0" - dependencies: - jest-regex-util: ^29.6.3 - jest-snapshot: ^29.7.0 - checksum: aeb75d8150aaae60ca2bb345a0d198f23496494677cd6aefa26fc005faf354061f073982175daaf32b4b9d86b26ca928586344516e3e6969aa614cb13b883984 - languageName: node - linkType: hard - -"jest-resolve@npm:^29.7.0": - version: 29.7.0 - resolution: "jest-resolve@npm:29.7.0" - dependencies: - chalk: ^4.0.0 - graceful-fs: ^4.2.9 - jest-haste-map: ^29.7.0 - jest-pnp-resolver: ^1.2.2 - jest-util: ^29.7.0 - jest-validate: ^29.7.0 - resolve: ^1.20.0 - resolve.exports: ^2.0.0 - slash: ^3.0.0 - checksum: 0ca218e10731aa17920526ec39deaec59ab9b966237905ffc4545444481112cd422f01581230eceb7e82d86f44a543d520a71391ec66e1b4ef1a578bd5c73487 - languageName: node - linkType: hard - -"jest-runner@npm:^29.7.0": - version: 29.7.0 - resolution: "jest-runner@npm:29.7.0" - dependencies: - "@jest/console": ^29.7.0 - "@jest/environment": ^29.7.0 - "@jest/test-result": ^29.7.0 - "@jest/transform": ^29.7.0 - "@jest/types": ^29.6.3 - "@types/node": "*" - chalk: ^4.0.0 - emittery: ^0.13.1 - graceful-fs: ^4.2.9 - jest-docblock: ^29.7.0 - jest-environment-node: ^29.7.0 - jest-haste-map: ^29.7.0 - jest-leak-detector: ^29.7.0 - jest-message-util: ^29.7.0 - jest-resolve: ^29.7.0 - jest-runtime: ^29.7.0 - jest-util: ^29.7.0 - jest-watcher: ^29.7.0 - jest-worker: ^29.7.0 - p-limit: ^3.1.0 - source-map-support: 0.5.13 - checksum: f0405778ea64812bf9b5c50b598850d94ccf95d7ba21f090c64827b41decd680ee19fcbb494007cdd7f5d0d8906bfc9eceddd8fa583e753e736ecd462d4682fb - languageName: node - linkType: hard - -"jest-runtime@npm:^29.7.0": - version: 29.7.0 - resolution: "jest-runtime@npm:29.7.0" - dependencies: - "@jest/environment": ^29.7.0 - "@jest/fake-timers": ^29.7.0 - "@jest/globals": ^29.7.0 - "@jest/source-map": ^29.6.3 - "@jest/test-result": ^29.7.0 - "@jest/transform": ^29.7.0 - "@jest/types": ^29.6.3 - "@types/node": "*" - chalk: ^4.0.0 - cjs-module-lexer: ^1.0.0 - collect-v8-coverage: ^1.0.0 - glob: ^7.1.3 - graceful-fs: ^4.2.9 - jest-haste-map: ^29.7.0 - jest-message-util: ^29.7.0 - jest-mock: ^29.7.0 - jest-regex-util: ^29.6.3 - jest-resolve: ^29.7.0 - jest-snapshot: ^29.7.0 - jest-util: ^29.7.0 - slash: ^3.0.0 - strip-bom: ^4.0.0 - checksum: d19f113d013e80691e07047f68e1e3448ef024ff2c6b586ce4f90cd7d4c62a2cd1d460110491019719f3c59bfebe16f0e201ed005ef9f80e2cf798c374eed54e - languageName: node - linkType: hard - -"jest-snapshot@npm:^29.7.0": - version: 29.7.0 - resolution: "jest-snapshot@npm:29.7.0" - dependencies: - "@babel/core": ^7.11.6 - "@babel/generator": ^7.7.2 - "@babel/plugin-syntax-jsx": ^7.7.2 - "@babel/plugin-syntax-typescript": ^7.7.2 - "@babel/types": ^7.3.3 - "@jest/expect-utils": ^29.7.0 - "@jest/transform": ^29.7.0 - "@jest/types": ^29.6.3 - babel-preset-current-node-syntax: ^1.0.0 - chalk: ^4.0.0 - expect: ^29.7.0 - graceful-fs: ^4.2.9 - jest-diff: ^29.7.0 - jest-get-type: ^29.6.3 - jest-matcher-utils: ^29.7.0 - jest-message-util: ^29.7.0 - jest-util: ^29.7.0 - natural-compare: ^1.4.0 - pretty-format: ^29.7.0 - semver: ^7.5.3 - checksum: 86821c3ad0b6899521ce75ee1ae7b01b17e6dfeff9166f2cf17f012e0c5d8c798f30f9e4f8f7f5bed01ea7b55a6bc159f5eda778311162cbfa48785447c237ad - languageName: node - linkType: hard - -"jest-util@npm:^29.0.0, jest-util@npm:^29.7.0": - version: 29.7.0 - resolution: "jest-util@npm:29.7.0" - dependencies: - "@jest/types": ^29.6.3 - "@types/node": "*" - chalk: ^4.0.0 - ci-info: ^3.2.0 - graceful-fs: ^4.2.9 - picomatch: ^2.2.3 - checksum: 042ab4980f4ccd4d50226e01e5c7376a8556b472442ca6091a8f102488c0f22e6e8b89ea874111d2328a2080083bf3225c86f3788c52af0bd0345a00eb57a3ca - languageName: node - linkType: hard - -"jest-validate@npm:^29.7.0": - version: 29.7.0 - resolution: "jest-validate@npm:29.7.0" - dependencies: + "@babel/code-frame": ^7.12.13 "@jest/types": ^29.6.3 - camelcase: ^6.2.0 + "@types/stack-utils": ^2.0.0 chalk: ^4.0.0 - jest-get-type: ^29.6.3 - leven: ^3.1.0 + graceful-fs: ^4.2.9 + micromatch: ^4.0.4 pretty-format: ^29.7.0 - checksum: 191fcdc980f8a0de4dbdd879fa276435d00eb157a48683af7b3b1b98b0f7d9de7ffe12689b617779097ff1ed77601b9f7126b0871bba4f776e222c40f62e9dae + slash: ^3.0.0 + stack-utils: ^2.0.3 + checksum: a9d025b1c6726a2ff17d54cc694de088b0489456c69106be6b615db7a51b7beb66788bea7a59991a019d924fbf20f67d085a445aedb9a4d6760363f4d7d09930 languageName: node linkType: hard -"jest-watcher@npm:^29.7.0": +"jest-util@npm:^29.7.0": version: 29.7.0 - resolution: "jest-watcher@npm:29.7.0" + resolution: "jest-util@npm:29.7.0" dependencies: - "@jest/test-result": ^29.7.0 "@jest/types": ^29.6.3 "@types/node": "*" - ansi-escapes: ^4.2.1 chalk: ^4.0.0 - emittery: ^0.13.1 - jest-util: ^29.7.0 - string-length: ^4.0.1 - checksum: 67e6e7fe695416deff96b93a14a561a6db69389a0667e9489f24485bb85e5b54e12f3b2ba511ec0b777eca1e727235b073e3ebcdd473d68888650489f88df92f + ci-info: ^3.2.0 + graceful-fs: ^4.2.9 + picomatch: ^2.2.3 + checksum: 042ab4980f4ccd4d50226e01e5c7376a8556b472442ca6091a8f102488c0f22e6e8b89ea874111d2328a2080083bf3225c86f3788c52af0bd0345a00eb57a3ca languageName: node linkType: hard @@ -9750,7 +9218,7 @@ __metadata: languageName: node linkType: hard -"jest-worker@npm:^29.4.3, jest-worker@npm:^29.7.0": +"jest-worker@npm:^29.4.3": version: 29.7.0 resolution: "jest-worker@npm:29.7.0" dependencies: @@ -9762,25 +9230,6 @@ __metadata: languageName: node linkType: hard -"jest@npm:^29.7.0": - version: 29.7.0 - resolution: "jest@npm:29.7.0" - dependencies: - "@jest/core": ^29.7.0 - "@jest/types": ^29.6.3 - import-local: ^3.0.2 - jest-cli: ^29.7.0 - peerDependencies: - node-notifier: ^8.0.1 || ^9.0.0 || ^10.0.0 - peerDependenciesMeta: - node-notifier: - optional: true - bin: - jest: bin/jest.js - checksum: 17ca8d67504a7dbb1998cf3c3077ec9031ba3eb512da8d71cb91bcabb2b8995c4e4b292b740cb9bf1cbff5ce3e110b3f7c777b0cefb6f41ab05445f248d0ee0b - languageName: node - linkType: hard - "jiti@npm:^1.18.2, jiti@npm:^1.20.0": version: 1.21.0 resolution: "jiti@npm:1.21.0" @@ -10070,7 +9519,7 @@ __metadata: languageName: node linkType: hard -"lodash.memoize@npm:4.x, lodash.memoize@npm:^4.1.2": +"lodash.memoize@npm:^4.1.2": version: 4.1.2 resolution: "lodash.memoize@npm:4.1.2" checksum: 9ff3942feeccffa4f1fafa88d32f0d24fdc62fd15ded5a74a5f950ff5f0c6f61916157246744c620173dddf38d37095a92327d5fd3861e2063e736a5c207d089 @@ -10126,6 +9575,15 @@ __metadata: languageName: node linkType: hard +"loupe@npm:^3.1.0, loupe@npm:^3.1.1": + version: 3.1.1 + resolution: "loupe@npm:3.1.1" + dependencies: + get-func-name: ^2.0.1 + checksum: c7efa6bc6d71f25ca03eb13c9a069e35ed86799e308ca27a7a3eff8cdf9500e7c22d1f2411468d154a8e960e91e5e685e0c6c83e96db748f177c1adf30811153 + languageName: node + linkType: hard + "lower-case@npm:^2.0.2": version: 2.0.2 resolution: "lower-case@npm:2.0.2" @@ -10188,28 +9646,12 @@ __metadata: languageName: node linkType: hard -"magic-string@npm:^0.30.2, magic-string@npm:^0.30.3": - version: 0.30.5 - resolution: "magic-string@npm:0.30.5" - dependencies: - "@jridgewell/sourcemap-codec": ^1.4.15 - checksum: da10fecff0c0a7d3faf756913ce62bd6d5e7b0402be48c3b27bfd651b90e29677e279069a63b764bcdc1b8ecdcdb898f29a5c5ec510f2323e8d62ee057a6eb18 - languageName: node - linkType: hard - -"make-dir@npm:^3.0.0": - version: 3.1.0 - resolution: "make-dir@npm:3.1.0" +"magic-string@npm:^0.30.10, magic-string@npm:^0.30.2, magic-string@npm:^0.30.3": + version: 0.30.11 + resolution: "magic-string@npm:0.30.11" dependencies: - semver: ^6.0.0 - checksum: 484200020ab5a1fdf12f393fe5f385fc8e4378824c940fba1729dcd198ae4ff24867bc7a5646331e50cead8abff5d9270c456314386e629acec6dff4b8016b78 - languageName: node - linkType: hard - -"make-error@npm:1.x": - version: 1.3.6 - resolution: "make-error@npm:1.3.6" - checksum: b86e5e0e25f7f777b77fabd8e2cbf15737972869d852a22b7e73c17623928fccb826d8e46b9951501d3f20e51ad74ba8c59ed584f610526a48f8ccf88aaec402 + "@jridgewell/sourcemap-codec": ^1.5.0 + checksum: e041649453c9a3f31d2e731fc10e38604d50e20d3585cd48bc7713a6e2e1a3ad3012105929ca15750d59d0a3f1904405e4b95a23b7e69dc256db3c277a73a3ca languageName: node linkType: hard @@ -10237,15 +9679,6 @@ __metadata: languageName: node linkType: hard -"makeerror@npm:1.0.12": - version: 1.0.12 - resolution: "makeerror@npm:1.0.12" - dependencies: - tmpl: 1.0.5 - checksum: b38a025a12c8146d6eeea5a7f2bf27d51d8ad6064da8ca9405fcf7bf9b54acd43e3b30ddd7abb9b1bfa4ddb266019133313482570ddb207de568f71ecfcf6060 - languageName: node - linkType: hard - "mark.js@npm:^8.11.1": version: 8.11.1 resolution: "mark.js@npm:8.11.1" @@ -11133,6 +10566,13 @@ __metadata: languageName: node linkType: hard +"mimic-fn@npm:^4.0.0": + version: 4.0.0 + resolution: "mimic-fn@npm:4.0.0" + checksum: 995dcece15ee29aa16e188de6633d43a3db4611bcf93620e7e62109ec41c79c0f34277165b8ce5e361205049766e371851264c21ac64ca35499acb5421c2ba56 + languageName: node + linkType: hard + "mimic-response@npm:^3.1.0": version: 3.1.0 resolution: "mimic-response@npm:3.1.0" @@ -11436,13 +10876,6 @@ __metadata: languageName: node linkType: hard -"node-int64@npm:^0.4.0": - version: 0.4.0 - resolution: "node-int64@npm:0.4.0" - checksum: d0b30b1ee6d961851c60d5eaa745d30b5c95d94bc0e74b81e5292f7c42a49e3af87f1eb9e89f59456f80645d679202537de751b7d72e9e40ceea40c5e449057e - languageName: node - linkType: hard - "node-releases@npm:^2.0.14": version: 2.0.14 resolution: "node-releases@npm:2.0.14" @@ -11491,6 +10924,15 @@ __metadata: languageName: node linkType: hard +"npm-run-path@npm:^5.1.0": + version: 5.3.0 + resolution: "npm-run-path@npm:5.3.0" + dependencies: + path-key: ^4.0.0 + checksum: ae8e7a89da9594fb9c308f6555c73f618152340dcaae423e5fb3620026fefbec463618a8b761920382d666fa7a2d8d240b6fe320e8a6cdd54dc3687e2b659d25 + languageName: node + linkType: hard + "npmlog@npm:^6.0.0": version: 6.0.2 resolution: "npmlog@npm:6.0.2" @@ -11651,6 +11093,15 @@ __metadata: languageName: node linkType: hard +"onetime@npm:^6.0.0": + version: 6.0.0 + resolution: "onetime@npm:6.0.0" + dependencies: + mimic-fn: ^4.0.0 + checksum: 0846ce78e440841335d4e9182ef69d5762e9f38aa7499b19f42ea1c4cd40f0b4446094c455c713f9adac3f4ae86f613bb5e30c99e52652764d06a89f709b3788 + languageName: node + linkType: hard + "open@npm:^8.0.9, open@npm:^8.4.0": version: 8.4.2 resolution: "open@npm:8.4.2" @@ -11725,7 +11176,7 @@ __metadata: languageName: node linkType: hard -"p-limit@npm:^3.0.2, p-limit@npm:^3.1.0": +"p-limit@npm:^3.0.2": version: 3.1.0 resolution: "p-limit@npm:3.1.0" dependencies: @@ -11949,6 +11400,13 @@ __metadata: languageName: node linkType: hard +"path-key@npm:^4.0.0": + version: 4.0.0 + resolution: "path-key@npm:4.0.0" + checksum: 8e6c314ae6d16b83e93032c61020129f6f4484590a777eed709c4a01b50e498822b00f76ceaf94bc64dbd90b327df56ceadce27da3d83393790f1219e07721d7 + languageName: node + linkType: hard + "path-parse@npm:^1.0.7": version: 1.0.7 resolution: "path-parse@npm:1.0.7" @@ -11996,6 +11454,20 @@ __metadata: languageName: node linkType: hard +"pathe@npm:^1.1.2": + version: 1.1.2 + resolution: "pathe@npm:1.1.2" + checksum: ec5f778d9790e7b9ffc3e4c1df39a5bb1ce94657a4e3ad830c1276491ca9d79f189f47609884671db173400256b005f4955f7952f52a2aeb5834ad5fb4faf134 + languageName: node + linkType: hard + +"pathval@npm:^2.0.0": + version: 2.0.0 + resolution: "pathval@npm:2.0.0" + checksum: 682b6a6289de7990909effef7dae9aa7bb6218c0426727bccf66a35b34e7bfbc65615270c5e44e3c9557a5cb44b1b9ef47fc3cb18bce6ad3ba92bcd28467ed7d + languageName: node + linkType: hard + "periscopic@npm:^3.0.0": version: 3.1.0 resolution: "periscopic@npm:3.1.0" @@ -12007,10 +11479,10 @@ __metadata: languageName: node linkType: hard -"picocolors@npm:^1.0.0": - version: 1.0.0 - resolution: "picocolors@npm:1.0.0" - checksum: a2e8092dd86c8396bdba9f2b5481032848525b3dc295ce9b57896f931e63fc16f79805144321f72976383fc249584672a75cc18d6777c6b757603f372f745981 +"picocolors@npm:^1.0.0, picocolors@npm:^1.0.1": + version: 1.0.1 + resolution: "picocolors@npm:1.0.1" + checksum: fa68166d1f56009fc02a34cdfd112b0dd3cf1ef57667ac57281f714065558c01828cdf4f18600ad6851cbe0093952ed0660b1e0156bddf2184b6aaf5817553a5 languageName: node linkType: hard @@ -12028,22 +11500,6 @@ __metadata: languageName: node linkType: hard -"pirates@npm:^4.0.4": - version: 4.0.5 - resolution: "pirates@npm:4.0.5" - checksum: c9994e61b85260bec6c4fc0307016340d9b0c4f4b6550a957afaaff0c9b1ad58fbbea5cfcf083860a25cb27a375442e2b0edf52e2e1e40e69934e08dcc52d227 - languageName: node - linkType: hard - -"pkg-dir@npm:^4.2.0": - version: 4.2.0 - resolution: "pkg-dir@npm:4.2.0" - dependencies: - find-up: ^4.0.0 - checksum: 9863e3f35132bf99ae1636d31ff1e1e3501251d480336edb1c211133c8d58906bed80f154a1d723652df1fda91e01c7442c2eeaf9dc83157c7ae89087e43c8d6 - languageName: node - linkType: hard - "pkg-dir@npm:^7.0.0": version: 7.0.0 resolution: "pkg-dir@npm:7.0.0" @@ -12495,14 +11951,14 @@ __metadata: languageName: node linkType: hard -"postcss@npm:^8.4.21, postcss@npm:^8.4.24, postcss@npm:^8.4.26, postcss@npm:^8.4.38": - version: 8.4.38 - resolution: "postcss@npm:8.4.38" +"postcss@npm:^8.4.21, postcss@npm:^8.4.24, postcss@npm:^8.4.26, postcss@npm:^8.4.38, postcss@npm:^8.4.39": + version: 8.4.40 + resolution: "postcss@npm:8.4.40" dependencies: nanoid: ^3.3.7 - picocolors: ^1.0.0 + picocolors: ^1.0.1 source-map-js: ^1.2.0 - checksum: 649f9e60a763ca4b5a7bbec446a069edf07f057f6d780a5a0070576b841538d1ecf7dd888f2fbfd1f76200e26c969e405aeeae66332e6927dbdc8bdcb90b9451 + checksum: afd0cc49d2169dcd96c0f17e155c5d75de048956306a3017f1cfa6a7d66b941592245bed20f7796ceeccb2d8967749b623be2c7b010a74f67ea10fb5bdb8ba28 languageName: node linkType: hard @@ -12612,7 +12068,7 @@ __metadata: languageName: node linkType: hard -"prompts@npm:^2.0.1, prompts@npm:^2.4.2": +"prompts@npm:^2.4.2": version: 2.4.2 resolution: "prompts@npm:2.4.2" dependencies: @@ -12690,13 +12146,6 @@ __metadata: languageName: node linkType: hard -"pure-rand@npm:^6.0.0": - version: 6.0.1 - resolution: "pure-rand@npm:6.0.1" - checksum: 4bb565399993b815658a72e359f574ce4f04827a42a905105d61163ae86f456d91595a0e4241e7bce04328fae0638ae70ac0428d93ecb55971c465bd084f8648 - languageName: node - linkType: hard - "qs@npm:6.11.0": version: 6.11.0 resolution: "qs@npm:6.11.0" @@ -13264,15 +12713,6 @@ __metadata: languageName: node linkType: hard -"resolve-cwd@npm:^3.0.0": - version: 3.0.0 - resolution: "resolve-cwd@npm:3.0.0" - dependencies: - resolve-from: ^5.0.0 - checksum: 546e0816012d65778e580ad62b29e975a642989108d9a3c5beabfb2304192fa3c9f9146fbdfe213563c6ff51975ae41bac1d3c6e047dd9572c94863a057b4d81 - languageName: node - linkType: hard - "resolve-from@npm:^4.0.0": version: 4.0.0 resolution: "resolve-from@npm:4.0.0" @@ -13280,13 +12720,6 @@ __metadata: languageName: node linkType: hard -"resolve-from@npm:^5.0.0": - version: 5.0.0 - resolution: "resolve-from@npm:5.0.0" - checksum: 4ceeb9113e1b1372d0cd969f3468fa042daa1dd9527b1b6bb88acb6ab55d8b9cd65dbf18819f9f9ddf0db804990901dcdaade80a215e7b2c23daae38e64f5bdf - languageName: node - linkType: hard - "resolve-pathname@npm:^3.0.0": version: 3.0.0 resolution: "resolve-pathname@npm:3.0.0" @@ -13294,14 +12727,7 @@ __metadata: languageName: node linkType: hard -"resolve.exports@npm:^2.0.0": - version: 2.0.2 - resolution: "resolve.exports@npm:2.0.2" - checksum: 1c7778ca1b86a94f8ab4055d196c7d87d1874b96df4d7c3e67bbf793140f0717fd506dcafd62785b079cd6086b9264424ad634fb904409764c3509c3df1653f2 - languageName: node - linkType: hard - -"resolve@npm:^1.1.6, resolve@npm:^1.14.2, resolve@npm:^1.20.0, resolve@npm:^1.22.1, resolve@npm:^1.22.4": +"resolve@npm:^1.1.6, resolve@npm:^1.14.2, resolve@npm:^1.22.1, resolve@npm:^1.22.4": version: 1.22.8 resolution: "resolve@npm:1.22.8" dependencies: @@ -13314,7 +12740,7 @@ __metadata: languageName: node linkType: hard -"resolve@patch:resolve@^1.1.6#~builtin, resolve@patch:resolve@^1.14.2#~builtin, resolve@patch:resolve@^1.20.0#~builtin, resolve@patch:resolve@^1.22.1#~builtin, resolve@patch:resolve@^1.22.4#~builtin": +"resolve@patch:resolve@^1.1.6#~builtin, resolve@patch:resolve@^1.14.2#~builtin, resolve@patch:resolve@^1.22.1#~builtin, resolve@patch:resolve@^1.22.4#~builtin": version: 1.22.8 resolution: "resolve@patch:resolve@npm%3A1.22.8#~builtin::version=1.22.8&hash=c3c19d" dependencies: @@ -13435,26 +12861,26 @@ __metadata: languageName: node linkType: hard -"rollup@npm:^4.18.0": - version: 4.18.0 - resolution: "rollup@npm:4.18.0" - dependencies: - "@rollup/rollup-android-arm-eabi": 4.18.0 - "@rollup/rollup-android-arm64": 4.18.0 - "@rollup/rollup-darwin-arm64": 4.18.0 - "@rollup/rollup-darwin-x64": 4.18.0 - "@rollup/rollup-linux-arm-gnueabihf": 4.18.0 - "@rollup/rollup-linux-arm-musleabihf": 4.18.0 - "@rollup/rollup-linux-arm64-gnu": 4.18.0 - "@rollup/rollup-linux-arm64-musl": 4.18.0 - "@rollup/rollup-linux-powerpc64le-gnu": 4.18.0 - "@rollup/rollup-linux-riscv64-gnu": 4.18.0 - "@rollup/rollup-linux-s390x-gnu": 4.18.0 - "@rollup/rollup-linux-x64-gnu": 4.18.0 - "@rollup/rollup-linux-x64-musl": 4.18.0 - "@rollup/rollup-win32-arm64-msvc": 4.18.0 - "@rollup/rollup-win32-ia32-msvc": 4.18.0 - "@rollup/rollup-win32-x64-msvc": 4.18.0 +"rollup@npm:^4.13.0, rollup@npm:^4.18.0": + version: 4.19.1 + resolution: "rollup@npm:4.19.1" + dependencies: + "@rollup/rollup-android-arm-eabi": 4.19.1 + "@rollup/rollup-android-arm64": 4.19.1 + "@rollup/rollup-darwin-arm64": 4.19.1 + "@rollup/rollup-darwin-x64": 4.19.1 + "@rollup/rollup-linux-arm-gnueabihf": 4.19.1 + "@rollup/rollup-linux-arm-musleabihf": 4.19.1 + "@rollup/rollup-linux-arm64-gnu": 4.19.1 + "@rollup/rollup-linux-arm64-musl": 4.19.1 + "@rollup/rollup-linux-powerpc64le-gnu": 4.19.1 + "@rollup/rollup-linux-riscv64-gnu": 4.19.1 + "@rollup/rollup-linux-s390x-gnu": 4.19.1 + "@rollup/rollup-linux-x64-gnu": 4.19.1 + "@rollup/rollup-linux-x64-musl": 4.19.1 + "@rollup/rollup-win32-arm64-msvc": 4.19.1 + "@rollup/rollup-win32-ia32-msvc": 4.19.1 + "@rollup/rollup-win32-x64-msvc": 4.19.1 "@types/estree": 1.0.5 fsevents: ~2.3.2 dependenciesMeta: @@ -13494,7 +12920,7 @@ __metadata: optional: true bin: rollup: dist/bin/rollup - checksum: 54cde921e763017ce952ba76ec77d58dd9c01e3536c3be628d4af8c59d9b2f0e1e6a11b30fda44845c7b74098646cd972feb3bcd2f4a35d3293366f2eeb0a39e + checksum: b431700a5248563c0e1d03521b8262aad9adc46007159b2792569ff56e5b11cbaa555809b90765f291484dad726f2250270112943bcbd8a067608804d96fa3d5 languageName: node linkType: hard @@ -13699,7 +13125,7 @@ __metadata: languageName: node linkType: hard -"semver@npm:^6.0.0, semver@npm:^6.3.0, semver@npm:^6.3.1": +"semver@npm:^6.3.1": version: 6.3.1 resolution: "semver@npm:6.3.1" bin: @@ -13708,7 +13134,7 @@ __metadata: languageName: node linkType: hard -"semver@npm:^7.3.2, semver@npm:^7.3.5, semver@npm:^7.3.7, semver@npm:^7.3.8, semver@npm:^7.5.3, semver@npm:^7.5.4": +"semver@npm:^7.3.2, semver@npm:^7.3.5, semver@npm:^7.3.7, semver@npm:^7.3.8, semver@npm:^7.5.4": version: 7.5.4 resolution: "semver@npm:7.5.4" dependencies: @@ -13885,6 +13311,13 @@ __metadata: languageName: node linkType: hard +"siginfo@npm:^2.0.0": + version: 2.0.0 + resolution: "siginfo@npm:2.0.0" + checksum: 8aa5a98640ca09fe00d74416eca97551b3e42991614a3d1b824b115fc1401543650914f651ab1311518177e4d297e80b953f4cd4cd7ea1eabe824e8f2091de01 + languageName: node + linkType: hard + "signal-exit@npm:^3.0.2, signal-exit@npm:^3.0.3, signal-exit@npm:^3.0.7": version: 3.0.7 resolution: "signal-exit@npm:3.0.7" @@ -13892,10 +13325,10 @@ __metadata: languageName: node linkType: hard -"signal-exit@npm:^4.0.1": - version: 4.0.1 - resolution: "signal-exit@npm:4.0.1" - checksum: 832043367dca23e61ab6033e8b41c595fc805119bfe4fee63dea201cdc809a8b086bc54597bbbc1b2cde1a63c7dd554d1295ed2cca92db598233834a0b59b281 +"signal-exit@npm:^4.0.1, signal-exit@npm:^4.1.0": + version: 4.1.0 + resolution: "signal-exit@npm:4.1.0" + checksum: 64c757b498cb8629ffa5f75485340594d2f8189e9b08700e69199069c8e3070fb3e255f7ab873c05dc0b3cec412aea7402e10a5990cb6a050bd33ba062a6c549 languageName: node linkType: hard @@ -14017,16 +13450,6 @@ __metadata: languageName: node linkType: hard -"source-map-support@npm:0.5.13": - version: 0.5.13 - resolution: "source-map-support@npm:0.5.13" - dependencies: - buffer-from: ^1.0.0 - source-map: ^0.6.0 - checksum: 933550047b6c1a2328599a21d8b7666507427c0f5ef5eaadd56b5da0fd9505e239053c66fe181bf1df469a3b7af9d775778eee283cbb7ae16b902ddc09e93a97 - languageName: node - linkType: hard - "source-map-support@npm:~0.5.20": version: 0.5.21 resolution: "source-map-support@npm:0.5.21" @@ -14037,7 +13460,7 @@ __metadata: languageName: node linkType: hard -"source-map@npm:^0.6.0, source-map@npm:^0.6.1, source-map@npm:~0.6.0": +"source-map@npm:^0.6.0, source-map@npm:~0.6.0": version: 0.6.1 resolution: "source-map@npm:0.6.1" checksum: 59ce8640cf3f3124f64ac289012c2b8bd377c238e316fb323ea22fbfe83da07d81e000071d7242cad7a23cd91c7de98e4df8830ec3f133cb6133a5f6e9f67bc2 @@ -14117,6 +13540,13 @@ __metadata: languageName: node linkType: hard +"stackback@npm:0.0.2": + version: 0.0.2 + resolution: "stackback@npm:0.0.2" + checksum: 2d4dc4e64e2db796de4a3c856d5943daccdfa3dd092e452a1ce059c81e9a9c29e0b9badba91b43ef0d5ff5c04ee62feb3bcc559a804e16faf447bac2d883aa99 + languageName: node + linkType: hard + "statuses@npm:2.0.1": version: 2.0.1 resolution: "statuses@npm:2.0.1" @@ -14131,20 +13561,10 @@ __metadata: languageName: node linkType: hard -"std-env@npm:^3.0.1": - version: 3.3.2 - resolution: "std-env@npm:3.3.2" - checksum: c02256bb041ba1870d23f8360bc7e47a9cf1fabcd02c8b7c4246d48f2c6bb47b4f45c70964348844e6d36521df84c4a9d09d468654b51e0eb5c600e3392b4570 - languageName: node - linkType: hard - -"string-length@npm:^4.0.1": - version: 4.0.2 - resolution: "string-length@npm:4.0.2" - dependencies: - char-regex: ^1.0.2 - strip-ansi: ^6.0.0 - checksum: ce85533ef5113fcb7e522bcf9e62cb33871aa99b3729cec5595f4447f660b0cefd542ca6df4150c97a677d58b0cb727a3fe09ac1de94071d05526c73579bf505 +"std-env@npm:^3.0.1, std-env@npm:^3.7.0": + version: 3.7.0 + resolution: "std-env@npm:3.7.0" + checksum: 4f489d13ff2ab838c9acd4ed6b786b51aa52ecacdfeaefe9275fcb220ff2ac80c6e95674723508fd29850a694569563a8caaaea738eb82ca16429b3a0b50e510 languageName: node linkType: hard @@ -14274,13 +13694,6 @@ __metadata: languageName: node linkType: hard -"strip-bom@npm:^4.0.0": - version: 4.0.0 - resolution: "strip-bom@npm:4.0.0" - checksum: 9dbcfbaf503c57c06af15fe2c8176fb1bf3af5ff65003851a102749f875a6dbe0ab3b30115eccf6e805e9d756830d3e40ec508b62b3f1ddf3761a20ebe29d3f3 - languageName: node - linkType: hard - "strip-final-newline@npm:^2.0.0": version: 2.0.0 resolution: "strip-final-newline@npm:2.0.0" @@ -14288,6 +13701,13 @@ __metadata: languageName: node linkType: hard +"strip-final-newline@npm:^3.0.0": + version: 3.0.0 + resolution: "strip-final-newline@npm:3.0.0" + checksum: 23ee263adfa2070cd0f23d1ac14e2ed2f000c9b44229aec9c799f1367ec001478469560abefd00c5c99ee6f0b31c137d53ec6029c53e9f32a93804e18c201050 + languageName: node + linkType: hard + "strip-json-comments@npm:^3.1.1": version: 3.1.1 resolution: "strip-json-comments@npm:3.1.1" @@ -14454,17 +13874,6 @@ __metadata: languageName: node linkType: hard -"test-exclude@npm:^6.0.0": - version: 6.0.0 - resolution: "test-exclude@npm:6.0.0" - dependencies: - "@istanbuljs/schema": ^0.1.2 - glob: ^7.1.4 - minimatch: ^3.0.4 - checksum: 3b34a3d77165a2cb82b34014b3aba93b1c4637a5011807557dc2f3da826c59975a5ccad765721c4648b39817e3472789f9b0fa98fc854c5c1c7a1e632aacdc28 - languageName: node - linkType: hard - "text-table@npm:^0.2.0": version: 0.2.0 resolution: "text-table@npm:0.2.0" @@ -14493,6 +13902,34 @@ __metadata: languageName: node linkType: hard +"tinybench@npm:^2.8.0": + version: 2.8.0 + resolution: "tinybench@npm:2.8.0" + checksum: 024a307c6a71f6e2903e110952457ee3dfa606093b45d7f49efcfd01d452650e099474080677ff650b0fd76b49074425ac68ff2a70561699a78515a278bf0862 + languageName: node + linkType: hard + +"tinypool@npm:^1.0.0": + version: 1.0.0 + resolution: "tinypool@npm:1.0.0" + checksum: 59dab87b0811da2dc1ecbac9a99cde93d45450744d4a9fca628d805c452bbb5e5f214fd191127f665d062cae9cc159225dea5508d766e40a0c6c33f573e5c3b6 + languageName: node + linkType: hard + +"tinyrainbow@npm:^1.2.0": + version: 1.2.0 + resolution: "tinyrainbow@npm:1.2.0" + checksum: d1e2cb5400032c0092be00e4a3da5450bea8b4fad58bfb5d3c58ca37ff5c5e252f7fcfb9af247914854af79c46014add9d1042fe044358c305a129ed55c8be35 + languageName: node + linkType: hard + +"tinyspy@npm:^3.0.0": + version: 3.0.0 + resolution: "tinyspy@npm:3.0.0" + checksum: b5b686acff2b88de60ff8ecf89a2042320406aaeee2fba1828a7ea8a925fad3ed9f5e4d7a068154a9134473c472aa03da8ca92ee994bc57a741c5ede5fa7de4d + languageName: node + linkType: hard + "tmp@npm:^0.0.33": version: 0.0.33 resolution: "tmp@npm:0.0.33" @@ -14502,13 +13939,6 @@ __metadata: languageName: node linkType: hard -"tmpl@npm:1.0.5": - version: 1.0.5 - resolution: "tmpl@npm:1.0.5" - checksum: cd922d9b853c00fe414c5a774817be65b058d54a2d01ebb415840960406c669a0fc632f66df885e24cb022ec812739199ccbdb8d1164c3e513f85bfca5ab2873 - languageName: node - linkType: hard - "to-fast-properties@npm:^2.0.0": version: 2.0.0 resolution: "to-fast-properties@npm:2.0.0" @@ -14582,42 +14012,6 @@ __metadata: languageName: node linkType: hard -"ts-jest@npm:^29.1.4": - version: 29.1.4 - resolution: "ts-jest@npm:29.1.4" - dependencies: - bs-logger: 0.x - fast-json-stable-stringify: 2.x - jest-util: ^29.0.0 - json5: ^2.2.3 - lodash.memoize: 4.x - make-error: 1.x - semver: ^7.5.3 - yargs-parser: ^21.0.1 - peerDependencies: - "@babel/core": ">=7.0.0-beta.0 <8" - "@jest/transform": ^29.0.0 - "@jest/types": ^29.0.0 - babel-jest: ^29.0.0 - jest: ^29.0.0 - typescript: ">=4.3 <6" - peerDependenciesMeta: - "@babel/core": - optional: true - "@jest/transform": - optional: true - "@jest/types": - optional: true - babel-jest: - optional: true - esbuild: - optional: true - bin: - ts-jest: cli.js - checksum: e36cba389adbb3700b46422e883c8d25e76febcc01c4a39c801ef15e6edbd6da1695bdd144100153e992f98a754aea4099906955b1b9a83c3c72d77009c3d7e2 - languageName: node - linkType: hard - "tsc@npm:^2.0.4": version: 2.0.4 resolution: "tsc@npm:2.0.4" @@ -14627,6 +14021,20 @@ __metadata: languageName: node linkType: hard +"tsconfck@npm:^3.0.3": + version: 3.1.1 + resolution: "tsconfck@npm:3.1.1" + peerDependencies: + typescript: ^5.0.0 + peerDependenciesMeta: + typescript: + optional: true + bin: + tsconfck: bin/tsconfck.js + checksum: 92941c76f5a996a96b5d92c88d20f67c644bb04cfeb9e5d4d2fed5a8ecce207fc70334a6257e3c146a117aa88b75adabc0989ee8d80a4935745f2774bf3f50fe + languageName: node + linkType: hard + "tsconfig-paths@npm:^3.15.0": version: 3.15.0 resolution: "tsconfig-paths@npm:3.15.0" @@ -14673,13 +14081,6 @@ __metadata: languageName: node linkType: hard -"type-detect@npm:4.0.8": - version: 4.0.8 - resolution: "type-detect@npm:4.0.8" - checksum: 62b5628bff67c0eb0b66afa371bd73e230399a8d2ad30d852716efcc4656a7516904570cd8631a49a3ce57c10225adf5d0cbdcb47f6b0255fe6557c453925a15 - languageName: node - linkType: hard - "type-fest@npm:^0.20.2": version: 0.20.2 resolution: "type-fest@npm:0.20.2" @@ -15073,17 +14474,6 @@ __metadata: languageName: node linkType: hard -"v8-to-istanbul@npm:^9.0.1": - version: 9.1.0 - resolution: "v8-to-istanbul@npm:9.1.0" - dependencies: - "@jridgewell/trace-mapping": ^0.3.12 - "@types/istanbul-lib-coverage": ^2.0.1 - convert-source-map: ^1.6.0 - checksum: 2069d59ee46cf8d83b4adfd8a5c1a90834caffa9f675e4360f1157ffc8578ef0f763c8f32d128334424159bb6b01f3876acd39cd13297b2769405a9da241f8d1 - languageName: node - linkType: hard - "validator@npm:13.9.0": version: 13.9.0 resolution: "validator@npm:13.9.0" @@ -15178,6 +14568,126 @@ __metadata: languageName: node linkType: hard +"vite-node@npm:2.0.5": + version: 2.0.5 + resolution: "vite-node@npm:2.0.5" + dependencies: + cac: ^6.7.14 + debug: ^4.3.5 + pathe: ^1.1.2 + tinyrainbow: ^1.2.0 + vite: ^5.0.0 + bin: + vite-node: vite-node.mjs + checksum: 30071f1cd3d3b78fd52726d66d18d81b63b321dee70d03c259db959a72f46dce2d71f12a85eaf503497f562ce11fea51197a74888d5892d3c7f3ad0ef093ec25 + languageName: node + linkType: hard + +"vite-tsconfig-paths@npm:^4.3.2": + version: 4.3.2 + resolution: "vite-tsconfig-paths@npm:4.3.2" + dependencies: + debug: ^4.1.1 + globrex: ^0.1.2 + tsconfck: ^3.0.3 + peerDependencies: + vite: "*" + peerDependenciesMeta: + vite: + optional: true + checksum: 7105ff641379f9f7055110f33067b236c8ee71b1390c0e6482412cdcc7a98c2e139c1c2a483d14fe9045d1977c14dc931e1ff302d6257ec919c70379db9d2419 + languageName: node + linkType: hard + +"vite@npm:^5.0.0": + version: 5.3.5 + resolution: "vite@npm:5.3.5" + dependencies: + esbuild: ^0.21.3 + fsevents: ~2.3.3 + postcss: ^8.4.39 + rollup: ^4.13.0 + peerDependencies: + "@types/node": ^18.0.0 || >=20.0.0 + less: "*" + lightningcss: ^1.21.0 + sass: "*" + stylus: "*" + sugarss: "*" + terser: ^5.4.0 + dependenciesMeta: + fsevents: + optional: true + peerDependenciesMeta: + "@types/node": + optional: true + less: + optional: true + lightningcss: + optional: true + sass: + optional: true + stylus: + optional: true + sugarss: + optional: true + terser: + optional: true + bin: + vite: bin/vite.js + checksum: 5412700159e8906fc5ec5ac2cbcbee8a11180803b4a7c85494ae024a4f38d77eb5ab19b556a58745d6981361f8d2e181486f115f8abd4dc6ec3761fcd895e1b2 + languageName: node + linkType: hard + +"vitest@npm:^2.0.4": + version: 2.0.5 + resolution: "vitest@npm:2.0.5" + dependencies: + "@ampproject/remapping": ^2.3.0 + "@vitest/expect": 2.0.5 + "@vitest/pretty-format": ^2.0.5 + "@vitest/runner": 2.0.5 + "@vitest/snapshot": 2.0.5 + "@vitest/spy": 2.0.5 + "@vitest/utils": 2.0.5 + chai: ^5.1.1 + debug: ^4.3.5 + execa: ^8.0.1 + magic-string: ^0.30.10 + pathe: ^1.1.2 + std-env: ^3.7.0 + tinybench: ^2.8.0 + tinypool: ^1.0.0 + tinyrainbow: ^1.2.0 + vite: ^5.0.0 + vite-node: 2.0.5 + why-is-node-running: ^2.3.0 + peerDependencies: + "@edge-runtime/vm": "*" + "@types/node": ^18.0.0 || >=20.0.0 + "@vitest/browser": 2.0.5 + "@vitest/ui": 2.0.5 + happy-dom: "*" + jsdom: "*" + peerDependenciesMeta: + "@edge-runtime/vm": + optional: true + "@types/node": + optional: true + "@vitest/browser": + optional: true + "@vitest/ui": + optional: true + happy-dom: + optional: true + jsdom: + optional: true + bin: + vitest: vitest.mjs + checksum: 4709e7678d89f957d9bd8e4dd2f99734857df03e22d38d9c3986a75f608205572b73c2faaf059ed41a2dccbc5c65f6717bf66594d6459cf2e57ab175be9aebc1 + languageName: node + linkType: hard + "vx@workspace:*, vx@workspace:vx": version: 0.0.0-use.local resolution: "vx@workspace:vx" @@ -15190,14 +14700,14 @@ __metadata: fs-extra: ^11.2.0 glob: ^10.3.10 inquirer: ^9.2.12 - jest: ^29.7.0 onchange: ^7.1.0 prettier: ^3.3.1 rollup: ^4.18.0 rollup-plugin-terser: ^7.0.2 rollup-plugin-ts: ^3.4.5 - ts-jest: ^29.1.4 vest-utils: 0.0.3 + vite-tsconfig-paths: ^4.3.2 + vitest: ^2.0.4 yargs: ^17.7.2 bin: vx: ./cli.js @@ -15213,15 +14723,6 @@ __metadata: languageName: node linkType: hard -"walker@npm:^1.0.8": - version: 1.0.8 - resolution: "walker@npm:1.0.8" - dependencies: - makeerror: 1.0.12 - checksum: ad7a257ea1e662e57ef2e018f97b3c02a7240ad5093c392186ce0bcf1f1a60bbadd520d073b9beb921ed99f64f065efb63dfc8eec689a80e569f93c1c5d5e16c - languageName: node - linkType: hard - "watchpack@npm:^2.4.0": version: 2.4.0 resolution: "watchpack@npm:2.4.0" @@ -15496,6 +14997,18 @@ __metadata: languageName: node linkType: hard +"why-is-node-running@npm:^2.3.0": + version: 2.3.0 + resolution: "why-is-node-running@npm:2.3.0" + dependencies: + siginfo: ^2.0.0 + stackback: 0.0.2 + bin: + why-is-node-running: cli.js + checksum: 58ebbf406e243ace97083027f0df7ff4c2108baf2595bb29317718ef207cc7a8104e41b711ff65d6fa354f25daa8756b67f2f04931a4fd6ba9d13ae8197496fb + languageName: node + linkType: hard + "wide-align@npm:^1.1.5": version: 1.1.5 resolution: "wide-align@npm:1.1.5" @@ -15573,16 +15086,6 @@ __metadata: languageName: node linkType: hard -"write-file-atomic@npm:^4.0.2": - version: 4.0.2 - resolution: "write-file-atomic@npm:4.0.2" - dependencies: - imurmurhash: ^0.1.4 - signal-exit: ^3.0.7 - checksum: 5da60bd4eeeb935eec97ead3df6e28e5917a6bd317478e4a85a5285e8480b8ed96032bbcc6ecd07b236142a24f3ca871c924ec4a6575e623ec1b11bf8c1c253c - languageName: node - linkType: hard - "ws@npm:^7.3.1": version: 7.5.9 resolution: "ws@npm:7.5.9" @@ -15659,14 +15162,14 @@ __metadata: languageName: node linkType: hard -"yargs-parser@npm:^21.0.1, yargs-parser@npm:^21.1.1": +"yargs-parser@npm:^21.1.1": version: 21.1.1 resolution: "yargs-parser@npm:21.1.1" checksum: ed2d96a616a9e3e1cc7d204c62ecc61f7aaab633dcbfab2c6df50f7f87b393993fe6640d017759fe112d0cb1e0119f2b4150a87305cc873fd90831c6a58ccf1c languageName: node linkType: hard -"yargs@npm:^17.3.1, yargs@npm:^17.7.2": +"yargs@npm:^17.7.2": version: 17.7.2 resolution: "yargs@npm:17.7.2" dependencies: