diff --git a/.changeset/clever-eagles-repeat.md b/.changeset/clever-eagles-repeat.md
new file mode 100644
index 00000000000..a845151cc84
--- /dev/null
+++ b/.changeset/clever-eagles-repeat.md
@@ -0,0 +1,2 @@
+---
+---
diff --git a/.changeset/dry-turkeys-lay.md b/.changeset/dry-turkeys-lay.md
new file mode 100644
index 00000000000..a845151cc84
--- /dev/null
+++ b/.changeset/dry-turkeys-lay.md
@@ -0,0 +1,2 @@
+---
+---
diff --git a/.eslintrc.js b/.eslintrc.js
index c081b89da1d..b6cb63a3371 100644
--- a/.eslintrc.js
+++ b/.eslintrc.js
@@ -39,7 +39,7 @@ module.exports = {
"sort-imports-es6-autofix",
"ssr-friendly",
"jsx-a11y",
- "jest",
+ "vitest",
],
rules: {
"@typescript-eslint/adjacent-overload-signatures": "error",
@@ -177,19 +177,19 @@ module.exports = {
pathGroupsExcludedImportTypes: [],
},
],
- "jest/consistent-test-it": ["error", { fn: "it" }],
- "jest/expect-expect": "error",
- "jest/no-commented-out-tests": "error",
- "jest/no-conditional-expect": "error",
- "jest/no-focused-tests": "error",
- "jest/no-disabled-tests": "error",
- "jest/no-standalone-expect": "error",
- "jest/no-test-return-statement": "error",
- "jest/prefer-equality-matcher": "error",
- "jest/require-top-level-describe": "error",
- "jest/valid-describe-callback": "error",
- "jest/valid-expect": "error",
- "jest/valid-title": "error",
+ "vitest/consistent-test-it": ["error", { fn: "it" }],
+ "vitest/expect-expect": "error",
+ "vitest/no-commented-out-tests": "error",
+ "vitest/no-conditional-expect": "error",
+ "vitest/no-focused-tests": "error",
+ "vitest/no-disabled-tests": "error",
+ "vitest/no-standalone-expect": "error",
+ "vitest/no-test-return-statement": "error",
+ "vitest/prefer-equality-matcher": "error",
+ "vitest/require-top-level-describe": "error",
+ "vitest/valid-describe-callback": "error",
+ "vitest/valid-expect": "error",
+ "vitest/valid-title": "error",
"jsdoc/check-alignment": "off",
"jsdoc/check-indentation": "off",
"jsdoc/newline-after-description": "off",
@@ -320,7 +320,7 @@ module.exports = {
},
},
{
- files: ["**/bin/**", "jest.setup.ts"],
+ files: ["**/bin/**", "vitest.setup.ts"],
rules: {
"no-console": "off",
},
diff --git a/.github/actions/branch-preview/action.yml b/.github/actions/branch-preview/action.yml
index 4d6d295d411..794ed94dd98 100644
--- a/.github/actions/branch-preview/action.yml
+++ b/.github/actions/branch-preview/action.yml
@@ -29,7 +29,7 @@ runs:
body-includes: ":sparkles: Here is your branch preview! :sparkles:"
- name: Create or update comment
- uses: peter-evans/create-or-update-comment@v3
+ uses: peter-evans/create-or-update-comment@v4
with:
comment-id: ${{ steps.findComment.outputs.comment-id }}
issue-number: ${{ inputs.prNumber }}
diff --git a/.github/workflows/ci.yml b/.github/workflows/lint.yml
similarity index 86%
rename from .github/workflows/ci.yml
rename to .github/workflows/lint.yml
index a4190e39046..11009b4f3f1 100644
--- a/.github/workflows/ci.yml
+++ b/.github/workflows/lint.yml
@@ -1,4 +1,4 @@
-name: ci
+name: lint
on:
push:
@@ -53,12 +53,3 @@ jobs:
- uses: actions/checkout@v4
- uses: ./.github/actions/setup
- run: pnpm lint:styles
-
- jest:
- if: github.head_ref != 'changeset-release/main'
- runs-on: ubuntu-latest
- timeout-minutes: 10
- steps:
- - uses: actions/checkout@v4
- - uses: ./.github/actions/setup
- - run: pnpm test:ci
diff --git a/.github/workflows/test-stories.yaml b/.github/workflows/test-stories.yaml
index f92c0635bdf..4d0c0024699 100644
--- a/.github/workflows/test-stories.yaml
+++ b/.github/workflows/test-stories.yaml
@@ -62,7 +62,7 @@ jobs:
with:
artifactName: ${{ env.ARTIFACT_NAME }}
- name: Storybook tests (1/3)
- run: pnpm -F @docs/storybook test -- --shard 1/3
+ run: pnpm turbo @docs/storybook#test:storybook -- --shard 1/3
storybook-tests-2:
name: "test-storybook"
@@ -78,7 +78,7 @@ jobs:
with:
artifactName: ${{ env.ARTIFACT_NAME }}
- name: Storybook tests (2/3)
- run: pnpm -F @docs/storybook test -- --shard 2/3
+ run: pnpm turbo @docs/storybook#test:storybook -- --shard 2/3
storybook-tests-3:
name: "test-storybook"
@@ -94,7 +94,7 @@ jobs:
with:
artifactName: ${{ env.ARTIFACT_NAME }}
- name: Storybook tests (3/3)
- run: pnpm -F @docs/storybook test -- --shard 3/3
+ run: pnpm turbo @docs/storybook#test:storybook -- --shard 3/3
chromatic:
needs: run-check
diff --git a/.github/workflows/test-unit.yml b/.github/workflows/test-unit.yml
new file mode 100644
index 00000000000..fdc3458cd19
--- /dev/null
+++ b/.github/workflows/test-unit.yml
@@ -0,0 +1,52 @@
+name: test unit
+
+on:
+ push:
+ branches-ignore:
+ - main
+
+ # When Changesets opens a PR it does not trigger GitHub actions,
+ # because its token does not have permission to. This is a hack
+ # to allow one of us to trigger GitHub actions for a changesets PR
+ # by enabling automerge on the PR.
+ pull_request_target:
+ types:
+ - auto_merge_enabled
+ branches:
+ - main # the target branch of the PR
+ paths:
+ - "**/CHANGELOG.md" # only changesets releases touch changelogs
+
+jobs:
+ unit-tests:
+ if: github.head_ref != 'changeset-release/main'
+ name: "vitest"
+ runs-on: ubuntu-latest
+ timeout-minutes: 10
+ steps:
+ - uses: actions/checkout@v4
+ - uses: ./.github/actions/setup
+ - name: Unit tests (1/3)
+ run: pnpm test -- -- --run --shard=1/3
+
+ unit-tests-2:
+ if: github.head_ref != 'changeset-release/main'
+ name: "vitest"
+ runs-on: ubuntu-latest
+ timeout-minutes: 10
+ steps:
+ - uses: actions/checkout@v4
+ - uses: ./.github/actions/setup
+ - name: Unit tests (2/3)
+ run: pnpm test -- -- --run --shard=2/3
+
+ unit-tests-3:
+ if: github.head_ref != 'changeset-release/main'
+ name: "vitest"
+ runs-on: ubuntu-latest
+ timeout-minutes: 10
+ steps:
+ - uses: actions/checkout@v4
+ - uses: ./.github/actions/setup
+ - name: Unit tests (3/3)
+ run: pnpm test -- -- --run --shard=3/3
diff --git a/docs/.storybook/main.ts b/docs/.storybook/main.ts
index e9c3fa5a909..3347383cc20 100644
--- a/docs/.storybook/main.ts
+++ b/docs/.storybook/main.ts
@@ -1,6 +1,6 @@
import path, { join, dirname } from "path"
import type { StorybookConfig } from "@storybook/react-vite"
-import { mergeAlias } from "vite"
+import { nodePolyfills } from "vite-plugin-node-polyfills"
/**
* This function is used to resolve the absolute path of a package.
@@ -25,6 +25,14 @@ const config: StorybookConfig = {
"storybook-addon-pseudo-states",
],
framework: "@storybook/react-vite",
+ core: {
+ builder: {
+ name: "@storybook/builder-vite",
+ options: {
+ viteConfigPath: path.resolve(__dirname, "../../vite.config.ts"),
+ },
+ },
+ },
staticDirs: [
{
from: "../assets",
@@ -46,43 +54,10 @@ const config: StorybookConfig = {
},
},
},
- viteFinal: viteConfig => ({
- ...viteConfig,
- resolve: {
- alias: mergeAlias(
- [
- {
- // this is required for the SCSS modules
- find: /^~(.*)$/,
- replacement: "$1",
- },
- {
- // monorepo workspace aliases
- find: /^\@kaizen(.*)$/,
- replacement: path.resolve(__dirname, "../../packages$1"),
- },
- ],
- {
- "~storybook": path.resolve(__dirname, "../"),
- "~components": path.resolve(
- __dirname,
- "../../packages/components/src"
- ),
- "~design-tokens": path.resolve(
- __dirname,
- "../../packages/design-tokens/src"
- ),
- "~tailwind": path.resolve(__dirname, "../../packages/tailwind/src"),
- // i18n-react-intl package attempts to import locales from this path.
- // When rollup attempts to import from the 'find' path, it will be
- // redirected to import from the replacement path (Same as KAIO rollup config).
- "__@cultureamp/i18n-react-intl/locales": path.resolve(
- __dirname,
- "../../packages/components/locales"
- ),
- }
- ),
- },
- }),
+ viteFinal: config => {
+ config?.plugins?.push(nodePolyfills())
+
+ return config
+ },
}
export default config
diff --git a/docs/package.json b/docs/package.json
index 4defadfc8a8..f8aea1e547f 100644
--- a/docs/package.json
+++ b/docs/package.json
@@ -12,7 +12,7 @@
"build:test": "storybook build --test",
"build:chromatic": "storybook build --webpack-stats-json",
"build:tailwind": "npx tailwindcss -i ./tailwind.css -o ./.storybook/preview.css",
- "test": "test-storybook --skipTags='skip-test' --url http://127.0.0.1:6006",
+ "test:storybook": "test-storybook --skipTags='skip-test' --url http://127.0.0.1:6006",
"clean": "rimraf './storybook-static' './node_modules' '.turbo'"
},
"dependencies": {
@@ -24,6 +24,7 @@
"@kaizen/design-tokens": "workspace:*",
"@kaizen/tailwind": "workspace:*",
"@rollup/plugin-alias": "^5.1.0",
+ "@storybook/builder-vite": "^8.2.9",
"@storybook/manager-api": "^8.2.9",
"@storybook/react-vite": "^8.2.9",
"@storybook/test-runner": "^0.19.1",
@@ -33,10 +34,14 @@
"classnames": "^2.5.1",
"globals": "^15.9.0",
"highlight.js": "^11.10.0",
+ "jest-axe": "^9.0.0",
"sass": "^1.77.8",
"storybook": "^8.2.9",
"tailwindcss": "^3.4.10",
- "vite": "^5.4.2"
+ "vite-plugin-node-polyfills": "^0.22.0"
+ },
+ "peerDependencies": {
+ "vite": ">=5.4.2"
},
"eslintConfig": {
"extends": [
diff --git a/jest.config.ts b/jest.config.ts
deleted file mode 100644
index 55f26467cba..00000000000
--- a/jest.config.ts
+++ /dev/null
@@ -1,17 +0,0 @@
-import { JestConfigWithTsJest } from "ts-jest"
-
-const jestConfig: JestConfigWithTsJest = {
- preset: "ts-jest",
- testEnvironment: "jsdom",
- testMatch: ["**/*.spec.ts?(x)"],
- setupFilesAfterEnv: ["jest-canvas-mock", "/jest.setup.ts"],
- moduleNameMapper: {
- "\\.(jpe?g|png|webm|mp4)$": "jest-static-stubs/$1",
- "\\.s?css$": "identity-obj-proxy",
- },
- transformIgnorePatterns: ["[/\\\\]node_modules[/\\\\].+\\.(js|jsx|mjs)$"],
-}
-
-export default jestConfig
-
-process.env.TZ = "UTC"
diff --git a/jest.setup.ts b/jest.setup.ts
deleted file mode 100644
index bd218cf0411..00000000000
--- a/jest.setup.ts
+++ /dev/null
@@ -1,16 +0,0 @@
-import "@testing-library/jest-dom"
-
-/** @ts-ignore */
-global.IS_REACT_ACT_ENVIRONMENT = true
-
-const CONSOLE_FAIL_TYPES = ["error", "warn"] as const
-
-// Throw errors when a `console.error` or `console.warn` happens
-// by overriding the functions
-CONSOLE_FAIL_TYPES.forEach(type => {
- console[type] = message => {
- throw new Error(
- `Failing due to console.${type} while running test!\n\n${message}`
- )
- }
-})
diff --git a/package.json b/package.json
index a6910c7eac0..7c5c2bf68e1 100644
--- a/package.json
+++ b/package.json
@@ -12,13 +12,10 @@
"build": "pnpm turbo build",
"clean": "pnpm turbo clean && rimraf node_modules && pnpm store prune",
"test": "pnpm turbo test",
- "test:ci": "pnpm turbo test:ci",
- "jest:debug": "node --inspect-brk node_modules/.bin/jest --runInBand --no-cache",
- "eslint-config": "pnpm eslint -c .eslintrc.js --max-warnings=0",
"lint": "pnpm lint:js && pnpm lint:md && pnpm lint:format && pnpm lint:styles",
"lint:ts": "pnpm turbo lint:ts",
- "lint:js": "pnpm eslint-config '**/*.{ts,tsx,mjs,js}'",
- "lint:md": "pnpm eslint-config '**/*.{md,mdx}'",
+ "lint:js": "pnpm eslint '**/*.{ts,tsx,mjs,js}' --max-warnings=0",
+ "lint:md": "pnpm eslint '**/*.{md,mdx}' --max-warnings=0",
"lint:format": "pnpm prettier --check '**/*'",
"lint:scss": "pnpm stylelint '**/*.scss' --config .stylelintrc-scss.json",
"lint:css": "pnpm stylelint '**/*.css' --config .stylelintrc-css.mjs",
@@ -58,12 +55,9 @@
"@storybook/test": "^8.2.9",
"@storybook/theming": "^8.2.9",
"@stylistic/eslint-plugin": "^2.6.4",
- "@testing-library/dom": "^10.4.0",
- "@testing-library/jest-dom": "^6.4.8",
+ "@testing-library/jest-dom": "^6.5.0",
"@testing-library/react": "^16.0.0",
"@testing-library/user-event": "^14.5.2",
- "@types/jest": "^29.5.12",
- "@types/jest-axe": "^3.5.9",
"@types/node": "^20.14.12",
"@types/react": "^18.3.4",
"@types/react-dom": "^18.3.0",
@@ -74,18 +68,13 @@
"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",
"eslint-plugin-jsx-a11y": "^6.9.0",
"eslint-plugin-mdx": "^3.1.5",
"eslint-plugin-react": "^7.35.0",
"eslint-plugin-sort-imports-es6-autofix": "^0.6.0",
"eslint-plugin-ssr-friendly": "^1.3.0",
"eslint-plugin-storybook": "^0.8.0",
- "jest": "^29.7.0",
- "jest-axe": "^9.0.0",
- "jest-canvas-mock": "^2.5.2",
- "jest-environment-jsdom": "^29.7.0",
- "jest-static-stubs": "^0.0.1",
+ "eslint-plugin-vitest": "^0.5.4",
"node-fetch": "^3.3.2",
"playwright": "^1.46.1",
"plop": "^4.0.1",
@@ -95,15 +84,16 @@
"stylelint": "^16.8.2",
"stylelint-config-standard": "^36.0.1",
"stylelint-config-standard-scss": "^13.1.0",
- "ts-jest": "^29.2.4",
- "ts-node": "^10.9.2",
"turbo": "^2.0.14",
- "typescript": "^5.5.4"
+ "typescript": "^5.5.4",
+ "vite": "^5.4.2",
+ "vitest": "^2.0.5",
+ "vitest-axe": "^0.1.0"
},
"devDependenciesComments": {
- "ts-node": "Required for jest",
"@storybook/*": "Required for Storybook stories across all packages",
"chromatic": "Required for Storybook stories across all packages",
- "playwright": "Required for github actions setup"
+ "playwright": "Required for github actions setup",
+ "vite-plugin-node-polyfills": "Adds the node `assert` polyfill to Vite for prosemirror to run in storybook"
}
}
diff --git a/packages/components/__tests__/index.ts b/packages/components/__tests__/index.ts
index de336a4484f..413be08733e 100644
--- a/packages/components/__tests__/index.ts
+++ b/packages/components/__tests__/index.ts
@@ -1 +1 @@
-export * from "./renderWithIntl"
+export * from "./reactIntlMock"
diff --git a/packages/components/__tests__/reactIntlMock.ts b/packages/components/__tests__/reactIntlMock.ts
new file mode 100644
index 00000000000..428c373d3ed
--- /dev/null
+++ b/packages/components/__tests__/reactIntlMock.ts
@@ -0,0 +1,42 @@
+import { MessageDescriptor } from "@cultureamp/i18n-react-intl"
+import { vi } from "vitest"
+
+const replaceInputValue = (str: string, value: string): string => {
+ const regex = /{([^}]+)}/g
+ return str.replace(regex, (match, capturedValue) => {
+ if (capturedValue) {
+ return value[capturedValue]
+ }
+ // Handle other captured values here if needed
+ return match
+ })
+}
+
+// Note: This mock does not exist to enable testing of internationalisation,
+// but to silence the errors from components that requires `useIntl`
+// and `FormattedMessage` from `@cultureamp/i18n-react-intl`
+//
+// If you need to test internationalisation, you should use Storybook stories
+export const reactIntlMock = (): any => {
+ const mocks = vi.hoisted(() => ({
+ useIntl: vi.fn(),
+ FormattedMessage: vi.fn(),
+ }))
+
+ vi.mock("@cultureamp/i18n-react-intl", () => ({
+ StaticIntlProvider: ({ children }: { children: React.ReactNode }) =>
+ children,
+ useIntl: () => ({
+ formatMessage: (message: MessageDescriptor, values: any) =>
+ values
+ ? replaceInputValue(message.defaultMessage as string, values)
+ : message.defaultMessage,
+ }),
+ FormattedMessage: (message: MessageDescriptor & { values: any }) =>
+ message.values
+ ? replaceInputValue(message.defaultMessage as string, message.values)
+ : message.defaultMessage,
+ }))
+
+ return mocks
+}
diff --git a/packages/components/__tests__/renderWithIntl.tsx b/packages/components/__tests__/renderWithIntl.tsx
deleted file mode 100644
index 9c5489a383d..00000000000
--- a/packages/components/__tests__/renderWithIntl.tsx
+++ /dev/null
@@ -1,11 +0,0 @@
-import React from "react"
-import { StaticIntlProvider } from "@cultureamp/i18n-react-intl"
-import { render } from "@testing-library/react"
-
-/**
- * i18n is async, so ensure your test is `async` and you `await waitFor` your result
- */
-export const renderWithIntl = (
- children: React.ReactNode
-): ReturnType =>
- render({children} )
diff --git a/packages/components/codemods/utils/__snapshots__/transformSource.spec.ts.snap b/packages/components/codemods/utils/__snapshots__/transformSource.spec.ts.snap
index 74325cf4157..82debc5ae8d 100644
--- a/packages/components/codemods/utils/__snapshots__/transformSource.spec.ts.snap
+++ b/packages/components/codemods/utils/__snapshots__/transformSource.spec.ts.snap
@@ -1,6 +1,6 @@
-// Jest Snapshot v1, https://goo.gl/fbAQLP
+// Vitest Snapshot v1, https://vitest.dev/guide/snapshot.html
-exports[`transformSource updates the value of Pancakes topping to jam 1`] = `
+exports[`transformSource > updates the value of Pancakes topping to jam 1`] = `
"import * as React from "react";
// @ts-ignore
import { Pancakes } from "@kaizen/components";
diff --git a/packages/components/jest.config.ts b/packages/components/jest.config.ts
deleted file mode 100644
index d48a15af325..00000000000
--- a/packages/components/jest.config.ts
+++ /dev/null
@@ -1,16 +0,0 @@
-import { JestConfigWithTsJest } from "ts-jest"
-import sharedConfig from "../../jest.config"
-
-const jestConfig: JestConfigWithTsJest = {
- ...sharedConfig,
- roots: [""],
- moduleNameMapper: {
- ...sharedConfig.moduleNameMapper,
- "~tests": "/__tests__/index",
- "~tests/(.*)$": "/__tests__/$1",
- "~components/(.*)$": "/src/$1",
- "^__@cultureamp/i18n-react-intl/locales/(.*)": "/locales/$1",
- },
-}
-
-export default jestConfig
diff --git a/packages/components/jest.setup.ts b/packages/components/jest.setup.ts
deleted file mode 100644
index 017691afb46..00000000000
--- a/packages/components/jest.setup.ts
+++ /dev/null
@@ -1 +0,0 @@
-import "../../jest.setup"
diff --git a/packages/components/package.json b/packages/components/package.json
index 0152ad8015d..9276fe82d3d 100644
--- a/packages/components/package.json
+++ b/packages/components/package.json
@@ -40,8 +40,7 @@
"build:global-styles": "postcss ./styles/global.css --output dist/global.css",
"build:combine-styles": "concat-cli -f ./dist/global.css ./dist/styles.css -o ./dist/styles.css && rm ./dist/global.css",
"build:styles": "pnpm build:global-styles && pnpm build:combine-styles",
- "test": "FORCE_COLOR=1 jest",
- "test:ci": "pnpm test -- --ci",
+ "test": "FORCE_COLOR=1 vitest --config ../../vite.config.ts",
"update-icons": "./src/Icon/bin/update-icons.sh",
"i18n:extract": "pnpm i18n-extract",
"clean": "rimraf 'dist' 'node_modules' '.turbo'",
@@ -107,6 +106,8 @@
"@kaizen/design-tokens": "workspace:*",
"@kaizen/package-bundler": "workspace:*",
"@tanstack/react-query": "^5.51.23",
+ "@testing-library/dom": "^10.4.0",
+ "@types/jest-axe": "^3.5.9",
"@types/lodash.debounce": "^4.0.9",
"@types/react-highlight": "^0.12.8",
"@types/react-textfit": "^1.1.4",
@@ -114,6 +115,7 @@
"autoprefixer": "^10.4.20",
"concat-cli": "^4.0.0",
"identity-obj-proxy": "^3.0.0",
+ "jest-axe": "^9.0.0",
"lodash.isempty": "^4.4.0",
"normalize.css": "^8.0.1",
"postcss": "^8.4.41",
@@ -130,7 +132,6 @@
"sass": "^1.77.8",
"serialize-query-params": "^2.0.2",
"svgo": "^3.3.2",
- "ts-jest": "^29.2.4",
"tslib": "^2.6.3",
"tsx": "^4.17.0"
},
diff --git a/packages/components/src/Avatar/Avatar.spec.tsx b/packages/components/src/Avatar/Avatar.spec.tsx
index 915282e8841..e01f23ce4a2 100644
--- a/packages/components/src/Avatar/Avatar.spec.tsx
+++ b/packages/components/src/Avatar/Avatar.spec.tsx
@@ -6,7 +6,7 @@ describe(" ", () => {
// there is an issue with react-textfit that is only flagged in a test suite
// this solution silences that specific case https://github.com/malte-wessel/react-textfit/issues/35
beforeEach(() => {
- jest.spyOn(console, "warn").mockImplementation(() => "")
+ vi.spyOn(console, "warn").mockImplementation(() => "")
})
it("renders user initials if the image link is broken", () => {
diff --git a/packages/components/src/Calendar/utils/setFocusInCalendar.spec.tsx b/packages/components/src/Calendar/utils/setFocusInCalendar.spec.tsx
index 468309fb10a..8bd309c5561 100644
--- a/packages/components/src/Calendar/utils/setFocusInCalendar.spec.tsx
+++ b/packages/components/src/Calendar/utils/setFocusInCalendar.spec.tsx
@@ -2,13 +2,13 @@ import React from "react"
import { render, screen, within } from "@testing-library/react"
import { format } from "date-fns"
import { enUS } from "date-fns/locale"
+import { vi } from "vitest"
import { CalendarSingle, CalendarSingleProps } from "../CalendarSingle"
import { setFocusInCalendar } from "./setFocusInCalendar"
-
const CalendarWrapper = (props: Partial): JSX.Element => (
setFocusInCalendar(calendarElement, props.selected)
diff --git a/packages/components/src/Checkbox/Checkbox/Checkbox.spec.tsx b/packages/components/src/Checkbox/Checkbox/Checkbox.spec.tsx
index 000c35d11b2..f9fc7737176 100644
--- a/packages/components/src/Checkbox/Checkbox/Checkbox.spec.tsx
+++ b/packages/components/src/Checkbox/Checkbox/Checkbox.spec.tsx
@@ -1,9 +1,9 @@
import React from "react"
import { render, waitFor } from "@testing-library/react"
import userEvent from "@testing-library/user-event"
+import { vi } from "vitest"
import { CheckboxProps } from "./Checkbox"
import { Checkbox } from "."
-
const user = userEvent.setup()
const defaultProps = {
@@ -11,7 +11,7 @@ const defaultProps = {
checkedStatus: "off",
disabled: false,
name: "someCheckboxName",
- onCheck: jest.fn(),
+ onCheck: vi.fn(),
} satisfies CheckboxProps
describe(" ", () => {
diff --git a/packages/components/src/Collapsible/Collapsible/Collapsible.spec.tsx b/packages/components/src/Collapsible/Collapsible/Collapsible.spec.tsx
index 46854381a1d..0fd2833f4f5 100644
--- a/packages/components/src/Collapsible/Collapsible/Collapsible.spec.tsx
+++ b/packages/components/src/Collapsible/Collapsible/Collapsible.spec.tsx
@@ -1,23 +1,11 @@
import React from "react"
import { queryByTestId, render, waitFor } from "@testing-library/react"
import userEvent from "@testing-library/user-event"
+import { vi } from "vitest"
import { Collapsible } from "./Collapsible"
-
const user = userEvent.setup()
describe(" ", () => {
- it("includes the 'sticky' class on buttons when the 'sticky' prop is specified", () => {
- const { getByTestId } = render(
-
- First panel content
-
- )
-
- const collapsibleContainer = getByTestId("collapsible-header-1")
-
- expect(collapsibleContainer.classList.contains("sticky")).toBeTruthy()
- })
-
it("toggles the height of the section on click of the button", async () => {
const { getByTestId } = render(
@@ -74,7 +62,7 @@ describe(" ", () => {
})
it("runs the onToggle callback", async () => {
- const onToggle = jest.fn()
+ const onToggle = vi.fn()
const { getByTestId } = render(
diff --git a/packages/components/src/Collapsible/Collapsible/_docs/Collapsible.stickersheet.stories.tsx b/packages/components/src/Collapsible/Collapsible/_docs/Collapsible.stickersheet.stories.tsx
index e13bc87c537..b70e6dd7ca6 100644
--- a/packages/components/src/Collapsible/Collapsible/_docs/Collapsible.stickersheet.stories.tsx
+++ b/packages/components/src/Collapsible/Collapsible/_docs/Collapsible.stickersheet.stories.tsx
@@ -1,6 +1,8 @@
import React from "react"
import { Meta } from "@storybook/react"
+import { within } from "@storybook/test"
import { Heading } from "~components/Heading"
+import { Text } from "~components/Text"
import {
StickerSheet,
StickerSheetStory,
@@ -73,3 +75,50 @@ export const StickerSheetRTL: StickerSheetStory = {
name: "Sticker Sheet (RTL)",
parameters: { textDirection: "rtl" },
}
+
+export const Sticky: StickerSheetStory = {
+ render: () => (
+
+
+
+
+
+
+ Lorem ipsum dolor sit amet, consectetur adipiscing elit.
+ Phasellus ac scelerisque sem, vel ultricies justo. Donec eu
+ porttitor ante, nec gravida orci. Nulla facilisi. Cras varius
+ erat id fermentum mattis. Mauris bibendum vestibulum erat, quis
+ blandit metus viverra sit amet. Vivamus pretium vitae turpis ut
+ condimentum. Sed vulputate magna nisl, in cursus urna hendrerit
+ et. Aenean semper, est non feugiat sodales, nisl ligula aliquet
+ lorem, sit amet scelerisque arcu quam a sapien. Donec in viverra
+ urna.
+
+
+ Lorem ipsum dolor sit amet, consectetur adipiscing elit.
+ Phasellus ac scelerisque sem, vel ultricies justo. Donec eu
+ porttitor ante, nec gravida orci. Nulla facilisi. Cras varius
+ erat id fermentum mattis. Mauris bibendum vestibulum erat, quis
+ blandit metus viverra sit amet. Vivamus pretium vitae turpis ut
+ condimentum. Sed vulputate magna nisl, in cursus urna hendrerit
+ et. Aenean semper, est non feugiat sodales, nisl ligula aliquet
+ lorem, sit amet scelerisque arcu quam a sapien. Donec in viverra
+ urna.
+
+
+
+
+
+
+ ),
+ play: async ({ canvasElement }) => {
+ const canvas = within(canvasElement)
+ const element = canvas.getByTestId("bottom-content")
+ element.scrollIntoView({ behavior: "instant", block: "end" })
+ },
+}
diff --git a/packages/components/src/Collapsible/Collapsible/_docs/Collapsible.stories.tsx b/packages/components/src/Collapsible/Collapsible/_docs/Collapsible.stories.tsx
index 7a81b86a748..29db0efce90 100644
--- a/packages/components/src/Collapsible/Collapsible/_docs/Collapsible.stories.tsx
+++ b/packages/components/src/Collapsible/Collapsible/_docs/Collapsible.stories.tsx
@@ -88,17 +88,6 @@ export const CustomHeader: Story = {
),
}
-export const Sticky: Story = {
- args: {
- title: "Sticky header",
- },
- render: ({ title }) => (
-
- This does not work in Storybook docs, so use this as a code example only.
-
- ),
-}
-
const controlledSourceCode = `
const [isOpen, setIsOpen] = useState(false)
return ( )
diff --git a/packages/components/src/DateInput/DateInputDescription/DateInputDescription.spec.tsx b/packages/components/src/DateInput/DateInputDescription/DateInputDescription.spec.tsx
index 4d6defd338b..10a2e71188d 100644
--- a/packages/components/src/DateInput/DateInputDescription/DateInputDescription.spec.tsx
+++ b/packages/components/src/DateInput/DateInputDescription/DateInputDescription.spec.tsx
@@ -1,19 +1,18 @@
import React from "react"
-import { waitFor } from "@testing-library/react"
+import { waitFor, render } from "@testing-library/react"
import { enUS } from "date-fns/locale"
-import { renderWithIntl } from "~tests"
import { DateInputDescription } from "./DateInputDescription"
describe("DateInputDescription", () => {
it("returns template string when description is undefined", async () => {
- const { container } = renderWithIntl( )
+ const { container } = render( )
await waitFor(() => {
expect(container).toHaveTextContent("Input format:mm/dd/yyyy")
})
})
it("returns template string when description is empty string", async () => {
- const { container } = renderWithIntl(
+ const { container } = render(
)
await waitFor(() => {
@@ -22,7 +21,7 @@ describe("DateInputDescription", () => {
})
it("returns template string when description is a string", async () => {
- const { container } = renderWithIntl(
+ const { container } = render(
{
})
it("returns template string when description is an element", async () => {
- const { container } = renderWithIntl(
+ const { container } = render(
Custom description span}
locale={enUS}
diff --git a/packages/components/src/DateInput/DateInputWithIconButton/DateInputWithIconButton.spec.tsx b/packages/components/src/DateInput/DateInputWithIconButton/DateInputWithIconButton.spec.tsx
index a75139e0bc3..8d9316df9b6 100644
--- a/packages/components/src/DateInput/DateInputWithIconButton/DateInputWithIconButton.spec.tsx
+++ b/packages/components/src/DateInput/DateInputWithIconButton/DateInputWithIconButton.spec.tsx
@@ -1,6 +1,7 @@
import React, { useRef } from "react"
import { render, screen } from "@testing-library/react"
import userEvent from "@testing-library/user-event"
+import { vi } from "vitest"
import {
DateInputWithIconButton,
DateInputWithIconButtonProps,
@@ -11,7 +12,7 @@ const user = userEvent.setup()
const defaultProps: DateInputWithIconButtonProps = {
id: "test__date-input-with-icon-button",
labelText: "Due date",
- onButtonClick: jest.fn(),
+ onButtonClick: vi.fn(),
}
const DateInputWithIconButtonWrapper = (
@@ -52,10 +53,7 @@ describe(" ", () => {
describe("Refs", () => {
it("correctly passes through input and button refs", async () => {
- const onButtonClick = jest.fn<
- void,
- [string | null | undefined, string | null | undefined]
- >()
+ const onButtonClick = vi.fn()
const Wrapper = (): JSX.Element => {
const inputRef = useRef(null)
@@ -74,7 +72,7 @@ describe(" ", () => {
ref={ref}
id="test__date-input-field--ref"
labelText="label"
- onButtonClick={jest.fn()}
+ onButtonClick={vi.fn()}
/>
Click me
diff --git a/packages/components/src/DatePicker/DatePicker.spec.tsx b/packages/components/src/DatePicker/DatePicker.spec.tsx
index 980aacc0ca2..6d05a863b62 100644
--- a/packages/components/src/DatePicker/DatePicker.spec.tsx
+++ b/packages/components/src/DatePicker/DatePicker.spec.tsx
@@ -1,7 +1,7 @@
import React, { useEffect, useState } from "react"
-import { screen, waitFor, within } from "@testing-library/react"
+import { render, screen, waitFor, within } from "@testing-library/react"
import userEvent from "@testing-library/user-event"
-import { renderWithIntl } from "~tests"
+import { vi } from "vitest"
import { DatePicker } from "./DatePicker"
import { DatePickerProps } from "."
@@ -27,14 +27,14 @@ const DatePickerWrapper = ({
describe(" ", () => {
it("should not show the calendar initially", async () => {
- renderWithIntl( )
+ render( )
await waitFor(() => {
expect(screen.queryByRole("dialog")).not.toBeInTheDocument()
})
})
it("should have an empty input value when a date is not provided", async () => {
- renderWithIntl( )
+ render( )
await waitFor(() => {
const input = screen.getByLabelText("Input label", { selector: "input" })
expect(input).toHaveValue("")
@@ -42,7 +42,7 @@ describe(" ", () => {
})
it("should pre-fill the input when an initial date is provided", async () => {
- renderWithIntl( )
+ render( )
await waitFor(() => {
expect(screen.getByDisplayValue("Mar 1, 2022")).toBeInTheDocument()
})
@@ -68,7 +68,7 @@ describe(" ", () => {
)
}
- renderWithIntl( )
+ render( )
expect(screen.getByRole("combobox")).toBeInTheDocument()
expect(screen.getByRole("combobox")).toHaveValue("")
await waitFor(() => {
@@ -77,7 +77,7 @@ describe(" ", () => {
})
it("allows you to tab through input, button and calendar", async () => {
- renderWithIntl( )
+ render( )
const input = screen.getByLabelText("Input label", { selector: "input" })
await user.tab()
@@ -112,9 +112,7 @@ describe(" ", () => {
}, 6000)
it("should validate and close the calendar when the user presses the Enter key while focus is in the input", async () => {
- renderWithIntl(
-
- )
+ render( )
const input = screen.getByLabelText("Input label", { selector: "input" })
await user.click(input)
@@ -139,7 +137,7 @@ describe(" ", () => {
describe(" - Focus element", () => {
describe("Click on input", () => {
beforeEach(async () => {
- renderWithIntl( )
+ render( )
const input = screen.getByLabelText("Input label", { selector: "input" })
await user.click(input)
@@ -181,7 +179,7 @@ describe(" - Focus element", () => {
describe("Keydown arrow on input", () => {
it("shows focus within the calendar", async () => {
- renderWithIntl( )
+ render( )
const input = screen.getByLabelText("Input label", { selector: "input" })
await user.tab()
@@ -200,7 +198,7 @@ describe(" - Focus element", () => {
})
it("returns focus to the input when the user escapes from the calendar", async () => {
- renderWithIntl( )
+ render( )
const input = screen.getByLabelText("Input label", { selector: "input" })
await user.tab()
@@ -222,7 +220,7 @@ describe(" - Focus element", () => {
describe("Click on calendar button", () => {
beforeEach(async () => {
- renderWithIntl( )
+ render( )
const calendarButton = screen.getByRole("button", {
name: "Change date, Mar 1, 2022",
@@ -258,7 +256,7 @@ describe(" - Focus element", () => {
let calendarButton: HTMLElement
beforeEach(async () => {
- renderWithIntl( )
+ render( )
calendarButton = screen.getByRole("button", {
name: "Change date, Mar 1, 2022",
@@ -305,7 +303,7 @@ describe(" - Focus element", () => {
describe(" - Input format", () => {
it("formats values when focus is on the input", async () => {
- renderWithIntl( )
+ render( )
const input = screen.getByLabelText("Input label", { selector: "input" })
expect(input).toHaveValue("Mar 1, 2022")
@@ -318,7 +316,7 @@ describe(" - Input format", () => {
})
it("formats values when the input loses focus - onBlur", async () => {
- renderWithIntl( )
+ render( )
const input = screen.getByLabelText("Input label", { selector: "input" })
expect(input).toHaveValue("Mar 1, 2022")
@@ -340,7 +338,7 @@ describe(" - Input format", () => {
describe(" - Validation", () => {
describe("Custom Validation", () => {
it("displays custom validation message when provided (overrides inbuilt validation)", async () => {
- renderWithIntl(
+ render(
- Validation", () => {
})
it("does not show inbuilt validation message when onValidate is set", async () => {
- const onValidate = jest.fn()
- renderWithIntl(
+ const onValidate = vi.fn()
+ render(
- Validation", () => {
})
it("triggers validation when initial selected date is invalid", async () => {
- const onValidate = jest.fn()
- renderWithIntl(
+ const onValidate = vi.fn()
+ render(
- Validation", () => {
})
it("triggers validation when initial selected date is disabled", async () => {
- const onValidate = jest.fn()
- renderWithIntl(
+ const onValidate = vi.fn()
+ render(
- Validation", () => {
})
it("does not trigger validation when initial selected date is empty", async () => {
- const onValidate = jest.fn()
- renderWithIntl(
+ const onValidate = vi.fn()
+ render(
)
await waitFor(() => {
@@ -414,8 +412,8 @@ describe(" - Validation", () => {
})
it("does not trigger validation when initial selected date is valid", async () => {
- const onValidate = jest.fn()
- renderWithIntl(
+ const onValidate = vi.fn()
+ render(
- Validation", () => {
})
it("triggers validation when selected date is updated to invalid", async () => {
- const onValidate = jest.fn()
- renderWithIntl(
+ const onValidate = vi.fn()
+ render(
- Validation", () => {
describe("Inbuilt Validation", () => {
it("displays error message when selected day is invalid", async () => {
- renderWithIntl( )
+ render( )
await waitFor(() => {
const icon = screen.getByLabelText("error message")
@@ -461,7 +459,7 @@ describe(" - Validation", () => {
})
it("displays error message when selected day is disabled", async () => {
- renderWithIntl(
+ render(
- Validation", () => {
})
it("displays error message when input date is invalid", async () => {
- renderWithIntl( )
+ render( )
const input = screen.getByLabelText("Input label", { selector: "input" })
await user.type(input, "05/05/2022Blah")
@@ -491,9 +489,7 @@ describe(" - Validation", () => {
})
it("displays error message when input date is disabled", async () => {
- renderWithIntl(
-
- )
+ render( )
const input = screen.getByLabelText("Input label", { selector: "input" })
await user.type(input, "05/05/2022")
diff --git a/packages/components/src/DatePicker/subcomponents/DateInputField/DateInputField.spec.tsx b/packages/components/src/DatePicker/subcomponents/DateInputField/DateInputField.spec.tsx
index 511405355b9..7f4137b9278 100644
--- a/packages/components/src/DatePicker/subcomponents/DateInputField/DateInputField.spec.tsx
+++ b/packages/components/src/DatePicker/subcomponents/DateInputField/DateInputField.spec.tsx
@@ -1,8 +1,8 @@
import React, { useRef } from "react"
-import { screen, waitFor } from "@testing-library/react"
+import { screen, waitFor, render } from "@testing-library/react"
import userEvent from "@testing-library/user-event"
import { enUS } from "date-fns/locale"
-import { renderWithIntl } from "~tests"
+import { vi } from "vitest"
import { DateInputField, DateInputFieldProps } from "./DateInputField"
const user = userEvent.setup()
@@ -10,8 +10,8 @@ const user = userEvent.setup()
const defaultProps: DateInputFieldProps = {
id: "test__date-input-field",
labelText: "Bacon expiry",
- onButtonClick: jest.fn(),
- onKeyDown: jest.fn(),
+ onButtonClick: vi.fn(),
+ onKeyDown: vi.fn(),
value: undefined,
locale: enUS,
}
@@ -23,7 +23,7 @@ const DateInputFieldWrapper = (
describe(" ", () => {
describe("Input", () => {
it("associates the description with the input", async () => {
- renderWithIntl( )
+ render( )
await waitFor(() => {
expect(
screen.getByRole("textbox", {
@@ -37,7 +37,7 @@ describe(" ", () => {
describe("Icon button", () => {
it("has helpful label", async () => {
- renderWithIntl( )
+ render( )
await waitFor(() => {
expect(
screen.getByRole("button", { name: "Choose date" })
@@ -46,7 +46,7 @@ describe(" ", () => {
})
it("has helpful label showing the current date when one is selected", async () => {
- renderWithIntl(
+ render(
undefined}
@@ -62,7 +62,7 @@ describe(" ", () => {
describe("States", () => {
it("disables both input and icon button", async () => {
- renderWithIntl( )
+ render( )
const input = screen.getByRole("textbox", { name: "Bacon expiry" })
const calendarButton = screen.getByRole("button", { name: "Choose date" })
await waitFor(() => {
@@ -74,7 +74,7 @@ describe(" ", () => {
describe("Validation", () => {
it("shows validation message", async () => {
- renderWithIntl(
+ render(
", () => {
})
it("does not show validation message when field is disabled", async () => {
- renderWithIntl(
+ render(
", () => {
describe("Refs", () => {
it("correctly passes through input and button refs", async () => {
- const onButtonClick = jest.fn()
+ const onButtonClick = vi.fn()
const Wrapper = (): JSX.Element => {
const inputRef = useRef(null)
@@ -125,7 +125,7 @@ describe(" ", () => {
ref={ref}
id="test__date-input-field--ref"
labelText="Adventure time"
- onButtonClick={jest.fn()}
+ onButtonClick={vi.fn()}
locale={enUS}
/>
@@ -135,7 +135,7 @@ describe(" ", () => {
)
}
- renderWithIntl( )
+ render( )
await user.click(screen.getByText("Click me"))
expect(onButtonClick).toHaveBeenCalledWith(
diff --git a/packages/components/src/DatePicker/utils/validateDate.spec.ts b/packages/components/src/DatePicker/utils/validateDate.spec.ts
index 6d1ac9c8667..19a67fb35f0 100644
--- a/packages/components/src/DatePicker/utils/validateDate.spec.ts
+++ b/packages/components/src/DatePicker/utils/validateDate.spec.ts
@@ -1,5 +1,4 @@
-import { screen, waitFor } from "@testing-library/react"
-import { renderWithIntl } from "~tests"
+import { screen, waitFor, render } from "@testing-library/react"
import { validateDate } from "./validateDate"
describe("validateDate", () => {
@@ -40,7 +39,7 @@ describe("validateDate", () => {
})
expect(newDate).toBeUndefined()
- renderWithIntl(validationMessage)
+ render(validationMessage)
await waitFor(() => {
expect(screen.getByText("Date is invalid")).toBeVisible()
})
@@ -64,7 +63,7 @@ describe("validateDate", () => {
})
expect(newDate).toBeUndefined()
- renderWithIntl(validationMessage)
+ render(validationMessage)
await waitFor(() => {
expect(screen.getByText("Date is invalid")).toBeVisible()
})
@@ -88,7 +87,7 @@ describe("validateDate", () => {
})
expect(newDate).toBeUndefined()
- renderWithIntl(validationMessage)
+ render(validationMessage)
await waitFor(() => {
expect(screen.getByText("potato is an invalid date")).toBeVisible()
})
@@ -117,7 +116,7 @@ describe("validateDate", () => {
})
expect(newDate).toBeUndefined()
- renderWithIntl(validationMessage)
+ render(validationMessage)
await waitFor(() => {
expect(
screen.getByText("03/01/2022 is not available, try another date")
diff --git a/packages/components/src/EmptyState/EmptyState.spec.tsx b/packages/components/src/EmptyState/EmptyState.spec.tsx
index 90ecbf0d49b..7e4d9e0199d 100644
--- a/packages/components/src/EmptyState/EmptyState.spec.tsx
+++ b/packages/components/src/EmptyState/EmptyState.spec.tsx
@@ -2,7 +2,7 @@ import React from "react"
import { cleanup, render } from "@testing-library/react"
import { EmptyState, EmptyStateProps } from "./EmptyState"
-jest.mock("~components/Illustration", () => ({
+vi.mock("~components/Illustration", () => ({
EmptyStatesPositive: (): JSX.Element => (
EmptyStatesPositive_Component
),
diff --git a/packages/components/src/ErrorPage/ErrorPage.spec.tsx b/packages/components/src/ErrorPage/ErrorPage.spec.tsx
index b12a5ed3fb2..0f5df37ae96 100644
--- a/packages/components/src/ErrorPage/ErrorPage.spec.tsx
+++ b/packages/components/src/ErrorPage/ErrorPage.spec.tsx
@@ -1,28 +1,28 @@
import React from "react"
-import { screen, waitFor } from "@testing-library/react"
-import { renderWithIntl } from "~tests"
+import { screen, waitFor, render } from "@testing-library/react"
+import { vi } from "vitest"
import { ErrorPage } from "./ErrorPage"
describe(" ", () => {
beforeAll(() => {
- window.HTMLMediaElement.prototype.load = jest.fn()
- window.HTMLMediaElement.prototype.play = jest
+ window.HTMLMediaElement.prototype.load = vi.fn()
+ window.HTMLMediaElement.prototype.play = vi
.fn()
.mockResolvedValue(undefined)
- window.HTMLMediaElement.prototype.pause = jest.fn()
- window.matchMedia = jest.fn().mockImplementation(() => ({
+ window.HTMLMediaElement.prototype.pause = vi.fn()
+ window.matchMedia = vi.fn().mockImplementation(() => ({
media: "",
onchange: null,
- addListener: jest.fn(),
- removeListener: jest.fn(),
- addEventListener: jest.fn(),
- removeEventListener: jest.fn(),
+ addListener: vi.fn(),
+ removeListener: vi.fn(),
+ addEventListener: vi.fn(),
+ removeEventListener: vi.fn(),
matches: false,
}))
})
it("shows the correct content for error 400", async () => {
- renderWithIntl( )
+ render( )
await waitFor(() => {
expect(screen.getByText("Problem loading page")).toBeVisible()
expect(
@@ -35,7 +35,7 @@ describe(" ", () => {
})
it("shows the correct content for error 401", async () => {
- renderWithIntl( )
+ render( )
await waitFor(() => {
expect(screen.getByText("You can't view this page")).toBeVisible()
expect(
@@ -48,7 +48,7 @@ describe(" ", () => {
})
it("shows the correct content for error 403", async () => {
- renderWithIntl( )
+ render( )
await waitFor(() => {
expect(screen.getByText("You can't view this page")).toBeVisible()
expect(
@@ -61,7 +61,7 @@ describe(" ", () => {
})
it("shows the correct content for error 404", async () => {
- renderWithIntl( )
+ render( )
await waitFor(() => {
expect(screen.getByText("Page not found")).toBeVisible()
expect(
@@ -74,7 +74,7 @@ describe(" ", () => {
})
it("shows the correct content for error 422", async () => {
- renderWithIntl( )
+ render( )
await waitFor(() => {
expect(screen.getByText("Change couldn't be made")).toBeVisible()
expect(
@@ -87,7 +87,7 @@ describe(" ", () => {
})
it("shows the correct content for error 500", async () => {
- renderWithIntl( )
+ render( )
await waitFor(() => {
expect(
screen.getByText("Something's gone wrong on our side")
@@ -102,7 +102,7 @@ describe(" ", () => {
})
it("shows the correct content for error 502", async () => {
- renderWithIntl( )
+ render( )
await waitFor(() => {
expect(screen.getByText("You can't view this page")).toBeVisible()
expect(
@@ -115,7 +115,7 @@ describe(" ", () => {
})
it("shows the correct content for error 503", async () => {
- renderWithIntl( )
+ render( )
await waitFor(() => {
expect(screen.getByText("You can't view this page")).toBeVisible()
expect(
@@ -128,7 +128,7 @@ describe(" ", () => {
})
it("shows the correct content for error 504", async () => {
- renderWithIntl( )
+ render( )
await waitFor(() => {
expect(screen.getByText("You can't view this page")).toBeVisible()
expect(
diff --git a/packages/components/src/Filter/FilterBar/FilterBar.spec.tsx b/packages/components/src/Filter/FilterBar/FilterBar.spec.tsx
index e412d265151..770f079148b 100644
--- a/packages/components/src/Filter/FilterBar/FilterBar.spec.tsx
+++ b/packages/components/src/Filter/FilterBar/FilterBar.spec.tsx
@@ -1,7 +1,7 @@
import React, { useEffect, useState } from "react"
-import { screen, waitFor, within } from "@testing-library/react"
+import { screen, waitFor, within, render } from "@testing-library/react"
import userEvent from "@testing-library/user-event"
-import { renderWithIntl } from "~tests"
+import { vi } from "vitest"
import { FilterMultiSelect } from "../index"
import { FilterBar, FilterBarProps } from "./FilterBar"
import { useFilterBarContext } from "./context/FilterBarContext"
@@ -148,7 +148,7 @@ const waitForI18nContent = async (): Promise => {
describe(" ", () => {
it("renders filters in the provided order", async () => {
- const { getAllByTestId } = renderWithIntl(
+ const { getAllByTestId } = render(
filters={simpleFilters} />
)
await waitForI18nContent()
@@ -161,7 +161,7 @@ describe(" ", () => {
})
it("retains Filter accessibility", async () => {
- renderWithIntl( )
+ render( )
const filterButton = screen.getByRole("button", { name: "Flavour" })
await user.click(filterButton)
@@ -173,7 +173,7 @@ describe(" ", () => {
describe("Removable filters", () => {
it("shows inactive filters in the Add Filters menu only", async () => {
- const { getByRole, queryByText } = renderWithIntl(
+ const { getByRole, queryByText } = render(
filters={filtersRemovable} />
)
await waitForI18nContent()
@@ -192,7 +192,7 @@ describe(" ", () => {
})
it("shows removable filter as active if there is a default value", async () => {
- const { getByRole } = renderWithIntl(
+ const { getByRole } = render(
filters={filtersRemovable}
defaultValues={{ topping: "pearls" }}
@@ -206,7 +206,7 @@ describe(" ", () => {
})
it("does not show active removable filters in the Add Filters menu", async () => {
- const { getByRole } = renderWithIntl(
+ const { getByRole } = render(
filters={filtersRemovable}
defaultValues={{ topping: "pearls" }}
@@ -225,7 +225,7 @@ describe(" ", () => {
})
it("clears the value of a filter if it is removed", async () => {
- const { getByRole } = renderWithIntl(
+ const { getByRole } = render(
filters={filtersRemovable}
defaultValues={{ topping: "pearls" }}
@@ -258,7 +258,7 @@ describe(" ", () => {
})
it("adds new filters in the provided order", async () => {
- const { getByRole, getAllByTestId } = renderWithIntl(
+ const { getByRole, getAllByTestId } = render(
filters={simpleFilters.map(filter => ({
...filter,
@@ -293,7 +293,7 @@ describe(" ", () => {
describe("Dependent filters", () => {
describe("Condition not met", () => {
it("does not show a dependent filter", async () => {
- const { queryByRole, getByRole } = renderWithIntl(
+ const { queryByRole, getByRole } = render(
)
await waitForI18nContent()
@@ -304,7 +304,7 @@ describe(" ", () => {
})
it("clears the value if the filter is not usable", async () => {
- const { getByTestId } = renderWithIntl(
+ const { getByTestId } = render(
", () => {
describe("Condition met", () => {
it("shows a non-removable dependent filter in active filters", async () => {
- const { queryByRole, getByRole, findByRole } = renderWithIntl(
+ const { queryByRole, getByRole, findByRole } = render(
)
await waitForI18nContent()
@@ -343,7 +343,7 @@ describe(" ", () => {
})
it("shows a removable dependent filter in Add Filters menu", async () => {
- const { getByRole, findByRole } = renderWithIntl(
+ const { getByRole, findByRole } = render(
", () => {
describe("Condition result change", () => {
it("clears the value for an unusable filter", async () => {
- const checkValues = jest.fn]>()
+ const checkValues = vi.fn()
const Wrapper = (): JSX.Element => {
const [values, setValues] = useState>({
@@ -421,7 +421,7 @@ describe(" ", () => {
)
}
- const { queryByRole, getByRole } = renderWithIntl( )
+ const { queryByRole, getByRole } = render( )
await waitForI18nContent()
expect(
@@ -435,7 +435,7 @@ describe(" ", () => {
})
it("clears the value and removes a filter which loses usability", async () => {
- const checkValues = jest.fn]>()
+ const checkValues = vi.fn()
const Wrapper = (): JSX.Element => {
const [values, setValues] = useState>({
@@ -463,7 +463,7 @@ describe(" ", () => {
)
}
- const { getByRole } = renderWithIntl( )
+ const { getByRole } = render( )
await waitForI18nContent()
expect(
@@ -558,7 +558,7 @@ describe(" ", () => {
},
] satisfies Filters
- const { queryByRole, getByRole } = renderWithIntl(
+ const { queryByRole, getByRole } = render(
", () => {
describe("Clear all", () => {
it("clears all the values of all the filters", async () => {
- const { getByRole } = renderWithIntl(
+ const { getByRole } = render(
filters={simpleFilters}
defaultValues={{
@@ -671,7 +671,7 @@ describe(" ", () => {
})
it("removes all removable filters", async () => {
- const { getByRole } = renderWithIntl(
+ const { getByRole } = render(
filters={filtersRemovable}
defaultValues={{
@@ -740,7 +740,7 @@ describe(" ", () => {
)
}
- const { getByRole } = renderWithIntl( )
+ const { getByRole } = render( )
await waitForI18nContent()
const flavourButton = getByRole("button", { name: "Flavour" })
@@ -796,7 +796,7 @@ describe(" ", () => {
)
}
- const { getByRole, queryByRole } = renderWithIntl( )
+ const { getByRole, queryByRole } = render( )
await waitForI18nContent()
expect(queryByRole("button", { name: "Flavour" })).not.toBeInTheDocument()
@@ -861,7 +861,7 @@ describe(" ", () => {
)
}
- const fetchCityOptions = jest.fn((filterValues: Partial) => {
+ const fetchCityOptions = vi.fn((filterValues: Partial) => {
const isSupermanInFilterValue = filterValues.hero?.includes("superman")
const isBatmanInFilterValue = filterValues.hero?.includes("batman")
@@ -875,7 +875,7 @@ describe(" ", () => {
])
})
- const fetchHeroOptions = jest.fn((filterValues: Partial) => {
+ const fetchHeroOptions = vi.fn((filterValues: Partial) => {
const isGothamInFilterValue = filterValues.city?.includes("gotham")
const isMetroInFilterValue = filterValues.city?.includes("metro")
@@ -907,7 +907,7 @@ describe(" ", () => {
] satisfies Filters
it("can re-fetch options with all active filter values pulled off of the FilterBarContext", async () => {
- const { getByRole, queryByRole } = renderWithIntl(
+ const { getByRole, queryByRole } = render(
filters={config} defaultValues={{}} />
)
@@ -981,7 +981,7 @@ describe(" ", () => {
] satisfies Filters
it("opens the Custom Date filter when Cycle's 'custom' value is selected", async () => {
- const { getByRole } = renderWithIntl(
+ const { getByRole } = render(
filters={cycleFilters} />
)
await waitForI18nContent()
diff --git a/packages/components/src/Filter/FilterBar/context/utils/updateDependentFilters.spec.ts b/packages/components/src/Filter/FilterBar/context/utils/updateDependentFilters.spec.ts
index ef2760208ba..488024f37bd 100644
--- a/packages/components/src/Filter/FilterBar/context/utils/updateDependentFilters.spec.ts
+++ b/packages/components/src/Filter/FilterBar/context/utils/updateDependentFilters.spec.ts
@@ -1,9 +1,7 @@
+import { vi } from "vitest"
import { FilterBarState } from "../types"
import { updateDependentFilters } from "./updateDependentFilters"
-
-const sugarLevelIsUsableWhen = jest.fn(
- state => state.flavour.value !== undefined
-)
+const sugarLevelIsUsableWhen = vi.fn(state => state.flavour.value !== undefined)
type Values = {
flavour: string
diff --git a/packages/components/src/Filter/FilterBar/subcomponents/AddFiltersMenu/AddFiltersMenu.spec.tsx b/packages/components/src/Filter/FilterBar/subcomponents/AddFiltersMenu/AddFiltersMenu.spec.tsx
index c778f3f1700..5b4d76e2683 100644
--- a/packages/components/src/Filter/FilterBar/subcomponents/AddFiltersMenu/AddFiltersMenu.spec.tsx
+++ b/packages/components/src/Filter/FilterBar/subcomponents/AddFiltersMenu/AddFiltersMenu.spec.tsx
@@ -1,7 +1,6 @@
import React from "react"
-import { waitFor, screen } from "@testing-library/react"
+import { waitFor, screen, render } from "@testing-library/react"
import userEvent from "@testing-library/user-event"
-import { renderWithIntl } from "~tests"
import {
FilterBarProvider,
FilterBarProviderProps,
@@ -53,7 +52,7 @@ describe(" ", () => {
},
] satisfies Filters
- renderWithIntl( )
+ render( )
await waitFor(() => {
expect(screen.getByRole("button", { name: "Add Filters" })).toBeVisible()
@@ -80,7 +79,7 @@ describe(" ", () => {
},
] satisfies Filters
- renderWithIntl( )
+ render( )
await waitFor(() => {
const addFiltersButton = screen.getByRole("button", {
diff --git a/packages/components/src/Filter/FilterBar/subcomponents/FilterBarButton/FilterBarButton.spec.tsx b/packages/components/src/Filter/FilterBar/subcomponents/FilterBarButton/FilterBarButton.spec.tsx
index ddab7abe6cd..ca2cd27e8cf 100644
--- a/packages/components/src/Filter/FilterBar/subcomponents/FilterBarButton/FilterBarButton.spec.tsx
+++ b/packages/components/src/Filter/FilterBar/subcomponents/FilterBarButton/FilterBarButton.spec.tsx
@@ -1,7 +1,6 @@
import React from "react"
-import { screen, waitFor } from "@testing-library/react"
+import { screen, waitFor, render } from "@testing-library/react"
import userEvent from "@testing-library/user-event"
-import { renderWithIntl } from "~tests"
import { FilterBarProvider } from "../../context/FilterBarContext"
import { FilterBarButton, FilterBarButtonProps } from "./FilterBarButton"
@@ -43,9 +42,7 @@ const FilterBarButtonWrapper = (
describe(" ", () => {
it("does not show a remove button when it is not removable", async () => {
- const { getByRole, queryByRole } = renderWithIntl(
-
- )
+ const { getByRole, queryByRole } = render( )
await waitFor(() => {
expect(getByRole("button", { name: "Coffee" })).toBeVisible()
})
@@ -55,7 +52,7 @@ describe(" ", () => {
})
it("shows a remove button when it is removable", async () => {
- renderWithIntl( )
+ render( )
const filterButton = await screen.findByRole("button", { name: "Coffee" })
await waitFor(() => {
expect(filterButton).toBeVisible()
diff --git a/packages/components/src/Filter/FilterBar/subcomponents/FilterBarDatePicker/FilterBarDatePicker.spec.tsx b/packages/components/src/Filter/FilterBar/subcomponents/FilterBarDatePicker/FilterBarDatePicker.spec.tsx
index 1af358dc0bc..bd9121d70c6 100644
--- a/packages/components/src/Filter/FilterBar/subcomponents/FilterBarDatePicker/FilterBarDatePicker.spec.tsx
+++ b/packages/components/src/Filter/FilterBar/subcomponents/FilterBarDatePicker/FilterBarDatePicker.spec.tsx
@@ -1,7 +1,7 @@
import React, { useState } from "react"
-import { screen, waitFor, within } from "@testing-library/react"
+import { screen, waitFor, within, render } from "@testing-library/react"
import userEvent from "@testing-library/user-event"
-import { renderWithIntl } from "~tests"
+import { vi } from "vitest"
import {
FilterAttributes,
FilterBarProvider,
@@ -58,7 +58,7 @@ const FilterBarDatePickerWrapper = ({
describe(" ", () => {
it("shows the name in the trigger button", async () => {
- renderWithIntl( )
+ render( )
await waitFor(() => {
const triggerButton = screen.getByRole("button", { name: "Drank" })
expect(triggerButton).toBeInTheDocument()
@@ -67,7 +67,7 @@ describe(" ", () => {
describe("Removable", () => {
it("does not show the remove button when isRemovable is false", async () => {
- renderWithIntl( )
+ render( )
await waitFor(() => {
expect(
screen.getByRole("button", { name: "Drank" })
@@ -79,7 +79,7 @@ describe(" ", () => {
})
it("shows the remove button when isRemovable is true", async () => {
- renderWithIntl(
+ render(
", () => {
})
it("can toggle its open state", async () => {
- const { getByRole, queryByRole } = renderWithIntl(
-
- )
+ const { getByRole, queryByRole } = render( )
const triggerButton = getByRole("button", { name: "Drank" })
await user.click(triggerButton)
@@ -113,7 +111,7 @@ describe(" ", () => {
})
it("shows a selected value when provided", async () => {
- const { getByRole } = renderWithIntl(
+ const { getByRole } = render(
@@ -127,7 +125,7 @@ describe(" ", () => {
})
it("updates the selected value in the trigger button when selecting a date", async () => {
- renderWithIntl(
+ render(
@@ -156,8 +154,8 @@ describe(" ", () => {
})
it("allows calling additional functions on selection change", async () => {
- const onChange = jest.fn()
- renderWithIntl( )
+ const onChange = vi.fn()
+ render( )
const triggerButton = screen.getByRole("button", { name: "Drank" })
await user.click(triggerButton)
diff --git a/packages/components/src/Filter/FilterBar/subcomponents/FilterBarDateRangePicker/FilterBarDateRangePicker.spec.tsx b/packages/components/src/Filter/FilterBar/subcomponents/FilterBarDateRangePicker/FilterBarDateRangePicker.spec.tsx
index 48158fe11b2..0ef7ad67038 100644
--- a/packages/components/src/Filter/FilterBar/subcomponents/FilterBarDateRangePicker/FilterBarDateRangePicker.spec.tsx
+++ b/packages/components/src/Filter/FilterBar/subcomponents/FilterBarDateRangePicker/FilterBarDateRangePicker.spec.tsx
@@ -1,7 +1,6 @@
import React, { useState } from "react"
-import { screen, waitFor, within } from "@testing-library/react"
+import { screen, waitFor, within, render } from "@testing-library/react"
import userEvent from "@testing-library/user-event"
-import { renderWithIntl } from "~tests"
import {
FilterAttributes,
FilterBarProvider,
@@ -53,7 +52,7 @@ const FilterBarDateRangePickerWrapper = ({
describe(" ", () => {
it("shows the name in the trigger button", async () => {
- renderWithIntl( )
+ render( )
await waitFor(() => {
const triggerButton = screen.getByRole("button", { name: "Dates" })
expect(triggerButton).toBeInTheDocument()
@@ -62,7 +61,7 @@ describe(" ", () => {
describe("Removable", () => {
it("does not show the remove button when isRemovable is false", async () => {
- renderWithIntl( )
+ render( )
await waitFor(() => {
expect(
screen.getByRole("button", { name: "Dates" })
@@ -74,7 +73,7 @@ describe(" ", () => {
})
it("shows the remove button when isRemovable is true", async () => {
- const { getByRole } = renderWithIntl(
+ const { getByRole } = render(
", () => {
})
it("can toggle its open state", async () => {
- const { getByRole, queryByRole } = renderWithIntl(
+ const { getByRole, queryByRole } = render(
)
const triggerButton = getByRole("button", { name: "Dates" })
@@ -108,7 +107,7 @@ describe(" ", () => {
})
it("shows a selected value when provided", async () => {
- const { getByRole } = renderWithIntl(
+ const { getByRole } = render(
", () => {
})
it("updates the selected value in the trigger button", async () => {
- const { getByRole, getByText } = renderWithIntl(
+ const { getByRole, getByText } = render(
", () => {
}, 10000)
it("allows calling additional functions on value change", async () => {
- const onChange = jest.fn()
- const { getByRole, getByText } = renderWithIntl(
+ const onChange = vi.fn()
+ const { getByRole, getByText } = render(
({
describe(" ", () => {
it("shows the name in the trigger button", async () => {
- const { getByRole } = renderWithIntl( )
+ const { getByRole } = render( )
await waitFor(() => {
const triggerButton = getByRole("button", { name: "Toppings" })
expect(triggerButton).toBeVisible()
@@ -100,7 +100,7 @@ describe(" ", () => {
describe("Removable", () => {
it("does not show the remove button when isRemovable is false", async () => {
- const { queryByRole } = renderWithIntl( )
+ const { queryByRole } = render( )
await waitFor(() => {
expect(screen.getByRole("button", { name: "Toppings" })).toBeVisible()
})
@@ -110,7 +110,7 @@ describe(" ", () => {
})
it("shows the remove button when isRemovable is true", async () => {
- const { getByRole } = renderWithIntl(
+ const { getByRole } = render(
", () => {
})
it("hides the filter when remove button is clicked", async () => {
- const { getByRole } = renderWithIntl(
+ const { getByRole } = render(
", () => {
})
it("can toggle its open state", async () => {
- const { getByRole, queryByRole } = renderWithIntl(
-
- )
+ const { getByRole, queryByRole } = render( )
const triggerButton = getByRole("button", { name: "Toppings" })
await user.click(triggerButton)
@@ -168,7 +166,7 @@ describe(" ", () => {
})
it("shows a selected value when provided", async () => {
- const { getByRole } = renderWithIntl(
+ const { getByRole } = render(
@@ -182,7 +180,7 @@ describe(" ", () => {
})
it("updates the selected value in the trigger button", async () => {
- const { getByRole } = renderWithIntl(
+ const { getByRole } = render(
)
const triggerButton = getByRole("button", {
@@ -204,8 +202,8 @@ describe(" ", () => {
})
it("allows calling additional functions on selection change", async () => {
- const onChange = jest.fn()
- const { getByRole } = renderWithIntl(
+ const onChange = vi.fn()
+ const { getByRole } = render(
)
const triggerButton = getByRole("button", { name: "Toppings" })
@@ -257,7 +255,7 @@ describe(" ", () => {
)
}
- const { getByRole, getAllByRole, getByTestId } = renderWithIntl(
+ const { getByRole, getAllByRole, getByTestId } = render(
additionalFilters={[
{
diff --git a/packages/components/src/Filter/FilterBar/subcomponents/FilterBarSelect/FilterBarSelect.spec.tsx b/packages/components/src/Filter/FilterBar/subcomponents/FilterBarSelect/FilterBarSelect.spec.tsx
index 61cb16e0238..c09e2f67e61 100644
--- a/packages/components/src/Filter/FilterBar/subcomponents/FilterBarSelect/FilterBarSelect.spec.tsx
+++ b/packages/components/src/Filter/FilterBar/subcomponents/FilterBarSelect/FilterBarSelect.spec.tsx
@@ -1,7 +1,7 @@
import React, { useEffect, useState } from "react"
-import { waitFor, screen } from "@testing-library/react"
+import { waitFor, screen, render } from "@testing-library/react"
import userEvent from "@testing-library/user-event"
-import { renderWithIntl } from "~tests"
+import { vi } from "vitest"
import {
FilterAttributes,
FilterBarProvider,
@@ -67,7 +67,7 @@ const FilterBarSelectWrapper = ({
describe(" ", () => {
it("shows the name in the trigger button", async () => {
- renderWithIntl( )
+ render( )
await waitFor(() => {
const triggerButton = screen.getByRole("button", { name: "Flavour" })
expect(triggerButton).toBeInTheDocument()
@@ -76,7 +76,7 @@ describe(" ", () => {
describe("Removable", () => {
it("does not show the remove button when isRemovable is false", async () => {
- renderWithIntl( )
+ render( )
await waitFor(() => {
expect(
screen.getByRole("button", { name: "Flavour" })
@@ -88,7 +88,7 @@ describe(" ", () => {
})
it("shows the remove button when isRemovable is true", async () => {
- renderWithIntl(
+ render(
", () => {
})
it("can toggle its open state", async () => {
- const { getByRole, queryByRole } = renderWithIntl(
-
- )
+ const { getByRole, queryByRole } = render( )
const triggerButton = getByRole("button", { name: "Flavour" })
await user.click(triggerButton)
@@ -122,7 +120,7 @@ describe(" ", () => {
})
it("shows a selected value when provided", async () => {
- const { getByRole } = renderWithIntl(
+ const { getByRole } = render(
)
await waitFor(() => {
@@ -134,7 +132,7 @@ describe(" ", () => {
})
it("updates the selected value in the trigger button", async () => {
- const { getByRole } = renderWithIntl(
+ const { getByRole } = render(
)
const triggerButton = getByRole("button", {
@@ -156,8 +154,8 @@ describe(" ", () => {
})
it("allows calling additional functions on selection change", async () => {
- const onChange = jest.fn()
- const { getByRole } = renderWithIntl(
+ const onChange = vi.fn()
+ const { getByRole } = render(
)
const triggerButton = getByRole("button", { name: "Flavour" })
@@ -208,7 +206,7 @@ describe(" ", () => {
return
}
- const { getByRole, getAllByRole, getByTestId } = renderWithIntl(
+ const { getByRole, getAllByRole, getByTestId } = render(
additionalFilters={[
{
diff --git a/packages/components/src/Filter/FilterButton/FilterButtonRemovable/FilterButtonRemovable.spec.tsx b/packages/components/src/Filter/FilterButton/FilterButtonRemovable/FilterButtonRemovable.spec.tsx
index 8b07916050b..dc963b4fae7 100644
--- a/packages/components/src/Filter/FilterButton/FilterButtonRemovable/FilterButtonRemovable.spec.tsx
+++ b/packages/components/src/Filter/FilterButton/FilterButtonRemovable/FilterButtonRemovable.spec.tsx
@@ -1,7 +1,7 @@
import React, { useRef } from "react"
-import { screen, waitFor } from "@testing-library/react"
+import { screen, waitFor, render } from "@testing-library/react"
import userEvent from "@testing-library/user-event"
-import { renderWithIntl } from "~tests"
+import { vi } from "vitest"
import {
FilterButtonRemovable,
FilterButtonRemovableProps,
@@ -29,7 +29,7 @@ const FilterButtonRemovableWrapper = ({
describe(" ", () => {
it("should use fallback label for remove button if not specified", async () => {
- renderWithIntl( )
+ render( )
await waitFor(() => {
expect(
screen.getByRole("button", { name: "Remove filter - Desserts" })
@@ -39,7 +39,7 @@ describe(" ", () => {
describe("Refs", () => {
it("correctly passes through both button refs", async () => {
- const onClick = jest.fn()
+ const onClick = vi.fn()
const Wrapper = (): JSX.Element => {
const triggerRef = useRef(null)
@@ -72,7 +72,7 @@ describe(" ", () => {
)
}
- renderWithIntl( )
+ render( )
await user.click(screen.getByText("Click me"))
expect(onClick).toHaveBeenCalledWith(
diff --git a/packages/components/src/Filter/FilterDatePicker/FilterDatePicker.spec.tsx b/packages/components/src/Filter/FilterDatePicker/FilterDatePicker.spec.tsx
index 8f1f52dda2d..4755c82e151 100644
--- a/packages/components/src/Filter/FilterDatePicker/FilterDatePicker.spec.tsx
+++ b/packages/components/src/Filter/FilterDatePicker/FilterDatePicker.spec.tsx
@@ -1,7 +1,7 @@
import React, { useState } from "react"
import { render, screen, waitFor, within } from "@testing-library/react"
import userEvent from "@testing-library/user-event"
-import { renderWithIntl } from "~tests"
+
import { FilterButton } from "~components/Filter/FilterButton"
import { FilterDatePicker, FilterDatePickerProps } from "."
@@ -42,9 +42,7 @@ describe(" ", () => {
describe("Filter button", () => {
it("should show the selected date in the button", async () => {
- renderWithIntl(
-
- )
+ render( )
await waitFor(() => {
const filterButton = screen.getByRole("button", {
name: "Drank : 1 May 2022",
@@ -54,7 +52,7 @@ describe(" ", () => {
})
it("should show the calendar when the filter button is clicked", async () => {
- renderWithIntl( )
+ render( )
const filterButton = screen.getByRole("button", {
name: "Drank",
@@ -67,7 +65,7 @@ describe(" ", () => {
})
it("closes the popover when a valid date has been submitted via the calendar picker", async () => {
- const { getByRole } = renderWithIntl( )
+ const { getByRole } = render( )
const triggerButton = getByRole("button", {
name: "Drank",
})
@@ -90,7 +88,7 @@ describe(" ", () => {
describe("Text input", () => {
it("validates the date on blur", async () => {
- const { getByRole, getByLabelText, getByText } = renderWithIntl(
+ const { getByRole, getByLabelText, getByText } = render(
)
const triggerButton = getByRole("button", {
@@ -116,7 +114,7 @@ describe(" ", () => {
describe("Pressing Enter in the text input", () => {
it("closes the popover when a valid date has been submitted via the text input field", async () => {
- const { getByRole, getByLabelText } = renderWithIntl(
+ const { getByRole, getByLabelText } = render(
)
const triggerButton = getByRole("button", {
@@ -141,7 +139,7 @@ describe(" ", () => {
})
it("does not close the popover when an invalid date has been submitted via the text input field", async () => {
- const { getByRole, getByLabelText, getByText } = renderWithIntl(
+ const { getByRole, getByLabelText, getByText } = render(
)
const triggerButton = getByRole("button", {
@@ -168,10 +166,9 @@ describe(" ", () => {
})
it("does not close the popover when the text input field has been cleared", async () => {
- const { getByRole, getByLabelText, getByText, queryByText } =
- renderWithIntl(
-
- )
+ const { getByRole, getByLabelText, getByText, queryByText } = render(
+
+ )
const triggerButton = getByRole("button", {
name: "Drank : Invalid Date",
})
@@ -198,7 +195,7 @@ describe(" ", () => {
})
it("does not close the popover when there is a selected date and the user navigates months", async () => {
- const { getByRole } = renderWithIntl(
+ const { getByRole } = render(
)
const triggerButton = getByRole("button", {
@@ -224,7 +221,7 @@ describe(" ", () => {
})
it("updates the selected value in the trigger button when typing a date", async () => {
- const { getByRole, getByLabelText } = renderWithIntl(
+ const { getByRole, getByLabelText } = render(
)
const triggerButton = getByRole("button", {
diff --git a/packages/components/src/Filter/FilterDatePicker/hooks/useDateInputHandlers.spec.ts b/packages/components/src/Filter/FilterDatePicker/hooks/useDateInputHandlers.spec.ts
index e61f2a36121..f25ea369851 100644
--- a/packages/components/src/Filter/FilterDatePicker/hooks/useDateInputHandlers.spec.ts
+++ b/packages/components/src/Filter/FilterDatePicker/hooks/useDateInputHandlers.spec.ts
@@ -1,16 +1,16 @@
import { ChangeEvent, FocusEvent, KeyboardEvent } from "react"
import { renderHook, act } from "@testing-library/react"
import { enAU } from "date-fns/locale"
+import { vi } from "vitest"
import * as isSelectingDayInCalendar from "~components/Calendar/utils/isSelectingDayInCalendar"
import { useDateInputHandlers } from "./useDateInputHandlers"
-
const locale = enAU
-const setInputValue = jest.fn()
-const onDateChange = jest.fn()
+const setInputValue = vi.fn()
+const onDateChange = vi.fn()
describe("useDateInputHandlers", () => {
beforeEach(() => {
- jest.clearAllMocks()
+ vi.clearAllMocks()
})
describe("onChange", () => {
@@ -34,7 +34,7 @@ describe("useDateInputHandlers", () => {
})
it("calls custom onChange when provided", () => {
- const onChangeMock = jest.fn()
+ const onChangeMock = vi.fn()
const { result } = renderHook(() =>
useDateInputHandlers({
@@ -97,7 +97,7 @@ describe("useDateInputHandlers", () => {
})
it("calls custom onFocus when provided", () => {
- const onFocusMock = jest.fn]>()
+ const onFocusMock = vi.fn()
const { result } = renderHook(() =>
useDateInputHandlers({
@@ -122,7 +122,7 @@ describe("useDateInputHandlers", () => {
describe("onBlur", () => {
it("does not do anything when selecting a day in the calendar", () => {
- const onBlurMock = jest.fn]>()
+ const onBlurMock = vi.fn()
const { result } = renderHook(() =>
useDateInputHandlers({
locale,
@@ -136,10 +136,7 @@ describe("useDateInputHandlers", () => {
currentTarget: { value: "" },
} as FocusEvent
- const spy = jest.spyOn(
- isSelectingDayInCalendar,
- "isSelectingDayInCalendar"
- )
+ const spy = vi.spyOn(isSelectingDayInCalendar, "isSelectingDayInCalendar")
spy.mockReturnValue(true)
act(() => {
@@ -238,7 +235,7 @@ describe("useDateInputHandlers", () => {
})
it("calls custom onBlur when provided on input with value", () => {
- const onBlurMock = jest.fn]>()
+ const onBlurMock = vi.fn()
const { result } = renderHook(() =>
useDateInputHandlers({
locale,
@@ -260,7 +257,7 @@ describe("useDateInputHandlers", () => {
})
it("calls custom onBlur when provided on empty", () => {
- const onBlurMock = jest.fn]>()
+ const onBlurMock = vi.fn()
const { result } = renderHook(() =>
useDateInputHandlers({
locale,
@@ -305,7 +302,7 @@ describe("useDateInputHandlers", () => {
})
it("calls onDateSubmit when provided", () => {
- const onDateSubmit = jest.fn()
+ const onDateSubmit = vi.fn()
const { result } = renderHook(() =>
useDateInputHandlers({
@@ -330,7 +327,7 @@ describe("useDateInputHandlers", () => {
})
it("calls custom onKeyDown when provided", () => {
- const onKeyDownMock = jest.fn()
+ const onKeyDownMock = vi.fn()
const { result } = renderHook(() =>
useDateInputHandlers({
diff --git a/packages/components/src/Filter/FilterDatePicker/hooks/useDateValidation.spec.ts b/packages/components/src/Filter/FilterDatePicker/hooks/useDateValidation.spec.ts
index ee5a48b6773..16c100d5f80 100644
--- a/packages/components/src/Filter/FilterDatePicker/hooks/useDateValidation.spec.ts
+++ b/packages/components/src/Filter/FilterDatePicker/hooks/useDateValidation.spec.ts
@@ -1,6 +1,6 @@
import { act } from "react"
-import { waitFor, renderHook } from "@testing-library/react"
-import { renderWithIntl } from "~tests"
+import { waitFor, renderHook, render } from "@testing-library/react"
+
import { useDateValidation } from "./useDateValidation"
describe("useDateValidation()", () => {
@@ -40,9 +40,7 @@ describe("useDateValidation()", () => {
expect(result.current.validationMessage?.status).toBe("error")
- const { container } = renderWithIntl(
- result.current.validationMessage?.message
- )
+ const { container } = render(result.current.validationMessage?.message)
await waitFor(() => {
expect(container).toHaveTextContent("Date:potato is an invalid date")
})
diff --git a/packages/components/src/Filter/FilterDatePicker/subcomponents/FilterDatePickerField/FilterDatePickerField.spec.tsx b/packages/components/src/Filter/FilterDatePicker/subcomponents/FilterDatePickerField/FilterDatePickerField.spec.tsx
index 8c279e58188..a9f840a6fe3 100644
--- a/packages/components/src/Filter/FilterDatePicker/subcomponents/FilterDatePickerField/FilterDatePickerField.spec.tsx
+++ b/packages/components/src/Filter/FilterDatePicker/subcomponents/FilterDatePickerField/FilterDatePickerField.spec.tsx
@@ -1,12 +1,11 @@
-import React, { useState, FocusEvent } from "react"
-import { screen, waitFor, within } from "@testing-library/react"
+import React, { useState } from "react"
+import { screen, waitFor, within, render } from "@testing-library/react"
import userEvent from "@testing-library/user-event"
-import { renderWithIntl } from "~tests"
import { FilterDatePickerField, FilterDatePickerFieldProps } from "."
const user = userEvent.setup()
-const inputDateOnSubmit = jest.fn()
+const inputDateOnSubmit = vi.fn()
const FilterDatePickerFieldWrapper = ({
selectedDate,
@@ -36,19 +35,19 @@ const waitForI18nContent = async (): Promise => {
describe(" ", () => {
beforeEach(() => {
- jest.clearAllMocks()
+ vi.clearAllMocks()
})
describe("Inputs", () => {
it("has empty inputs when a date is not provided", async () => {
- renderWithIntl( )
+ render( )
await waitForI18nContent()
const inputDate = screen.getByLabelText("Date")
expect(inputDate).toHaveValue("")
})
it("pre-fills the inputs when date is provided", async () => {
- renderWithIntl(
+ render(
)
await waitForI18nContent()
@@ -57,7 +56,7 @@ describe(" ", () => {
})
it("allows customising the input labels", async () => {
- renderWithIntl(
+ render(
", () => {
describe("onBlur", () => {
it("updates date input and calendar values correctly on blur", async () => {
- const inputDateOnBlur = jest.fn()
+ const inputDateOnBlur = vi.fn()
- renderWithIntl(
+ render(
", () => {
describe("Press Enter key", () => {
it("updates calendar values and calls submit when the date is valid", async () => {
- renderWithIntl(
+ render(
)
await waitForI18nContent()
@@ -134,7 +133,7 @@ describe(" ", () => {
})
it("does not call submit when the date is invalid", async () => {
- renderWithIntl(
+ render(
)
await waitForI18nContent()
@@ -152,7 +151,7 @@ describe(" ", () => {
})
it("updates the calendar month to match the new start date input", async () => {
- renderWithIntl(
+ render(
)
await waitForI18nContent()
@@ -175,7 +174,7 @@ describe(" ", () => {
describe("Calendar", () => {
it("shows the default month as the start month when there isn't a selected value", async () => {
- renderWithIntl(
+ render(
)
await waitForI18nContent()
@@ -183,7 +182,7 @@ describe(" ", () => {
})
it("shows the selected start date month as the start month when provided", async () => {
- renderWithIntl(
+ render(
)
await waitForI18nContent()
@@ -191,9 +190,7 @@ describe(" ", () => {
})
it("shows the current month as the start month when selected date is invalid", async () => {
- renderWithIntl(
-
- )
+ render( )
await waitForI18nContent()
const currentMonth = new Date().toLocaleDateString("en-AU", {
month: "long",
@@ -203,7 +200,7 @@ describe(" ", () => {
})
it("calls the onDateSubmit when selecting a date", async () => {
- renderWithIntl(
+ render(
)
const targetMonth = screen.getByRole("grid", { name: "May 2022" })
@@ -218,7 +215,7 @@ describe(" ", () => {
})
it("updates the input when changing the date", async () => {
- renderWithIntl(
+ render(
)
await waitForI18nContent()
@@ -240,7 +237,7 @@ describe(" ", () => {
})
it("clears the inputs when clearing the calendar value", async () => {
- renderWithIntl(
+ render(
)
await waitForI18nContent()
@@ -266,7 +263,7 @@ describe(" ", () => {
describe("Custom validation", () => {
it("shows validation messages passed in from the consumer", async () => {
- renderWithIntl(
+ render(
undefined}
validationMessage={{
@@ -282,7 +279,7 @@ describe(" ", () => {
describe("Inbuilt validation", () => {
it("shows inbuilt validation messages", async () => {
- const { container } = renderWithIntl( )
+ const { container } = render( )
await waitForI18nContent()
const inputDate = screen.getByLabelText("Date")
@@ -301,7 +298,7 @@ describe(" ", () => {
})
it("shows inbuilt validation messages for pre-existing values", async () => {
- const { container } = renderWithIntl(
+ const { container } = render(
", () => {
})
it("does not call onDateSubmit when the input value is invalid", async () => {
- const { getByLabelText } = renderWithIntl(
-
- )
+ const { getByLabelText } = render( )
await waitForI18nContent()
const inputDate = getByLabelText("Date")
@@ -333,7 +328,7 @@ describe(" ", () => {
})
it("re-validates values when selecting a value using the calendar", async () => {
- const { container } = renderWithIntl(
+ const { container } = render(
()
-const setInbuiltValidationMessage = jest.fn<
- void,
- [ValidationMessage | undefined]
->()
+const onValidate = vi.fn()
+const setInbuiltValidationMessage = vi.fn()
describe("getDateValidationHandler()", () => {
afterEach(() => {
diff --git a/packages/components/src/Filter/FilterDatePicker/utils/validateDate.spec.ts b/packages/components/src/Filter/FilterDatePicker/utils/validateDate.spec.ts
index 1e08a64c246..bda141b05b6 100644
--- a/packages/components/src/Filter/FilterDatePicker/utils/validateDate.spec.ts
+++ b/packages/components/src/Filter/FilterDatePicker/utils/validateDate.spec.ts
@@ -1,5 +1,4 @@
-import { waitFor, screen } from "@testing-library/react"
-import { renderWithIntl } from "~tests"
+import { waitFor, screen, render } from "@testing-library/react"
import { validateDate } from "./validateDate"
describe("validateDate()", () => {
@@ -41,7 +40,7 @@ describe("validateDate()", () => {
expect(validationMessage?.status).toBe("error")
- renderWithIntl(validationMessage?.message)
+ render(validationMessage?.message)
await waitFor(() => {
expect(screen.getByText("Date is invalid")).toBeVisible()
})
@@ -67,7 +66,7 @@ describe("validateDate()", () => {
expect(validationMessage?.status).toBe("error")
- renderWithIntl(validationMessage?.message)
+ render(validationMessage?.message)
await waitFor(() => {
expect(screen.getByText("Date is invalid")).toBeVisible()
})
@@ -93,7 +92,7 @@ describe("validateDate()", () => {
expect(validationMessage?.status).toBe("error")
- renderWithIntl(validationMessage?.message)
+ render(validationMessage?.message)
await waitFor(() => {
expect(screen.getByText("potato is an invalid date")).toBeVisible()
})
@@ -124,7 +123,7 @@ describe("validateDate()", () => {
expect(validationMessage?.status).toBe("error")
- renderWithIntl(validationMessage?.message)
+ render(validationMessage?.message)
await waitFor(() => {
expect(
screen.getByText("03/01/2022 is not available, try another date")
diff --git a/packages/components/src/Filter/FilterDateRangePicker/FilterDateRangePicker.spec.tsx b/packages/components/src/Filter/FilterDateRangePicker/FilterDateRangePicker.spec.tsx
index 47f186f82db..544a5fe3fe9 100644
--- a/packages/components/src/Filter/FilterDateRangePicker/FilterDateRangePicker.spec.tsx
+++ b/packages/components/src/Filter/FilterDateRangePicker/FilterDateRangePicker.spec.tsx
@@ -1,7 +1,6 @@
import React, { useState } from "react"
import { render, waitFor } from "@testing-library/react"
import userEvent from "@testing-library/user-event"
-import { renderWithIntl } from "~tests"
import { DateRange } from "~components/Calendar"
import { FilterButton } from "~components/Filter/FilterButton"
import { FilterDateRangePicker, FilterDateRangePickerProps } from "./index"
@@ -82,7 +81,7 @@ describe(" ", () => {
})
it("should show the calendar when the filter button is clicked", async () => {
- const { queryByRole, getByRole, getByText } = renderWithIntl(
+ const { queryByRole, getByRole, getByText } = render(
)
expect(queryByRole("dialog")).not.toBeInTheDocument()
@@ -96,7 +95,7 @@ describe(" ", () => {
})
it("should not show a date range in the button if the selected range is not valid", async () => {
- const { getByRole, getByLabelText } = renderWithIntl(
+ const { getByRole, getByLabelText } = render(
diff --git a/packages/components/src/Filter/FilterDateRangePicker/_docs/FilterDateRangePicker.stickersheet.stories.tsx b/packages/components/src/Filter/FilterDateRangePicker/_docs/FilterDateRangePicker.stickersheet.stories.tsx
index a8243eeecb2..a82f0376ea6 100644
--- a/packages/components/src/Filter/FilterDateRangePicker/_docs/FilterDateRangePicker.stickersheet.stories.tsx
+++ b/packages/components/src/Filter/FilterDateRangePicker/_docs/FilterDateRangePicker.stickersheet.stories.tsx
@@ -135,6 +135,33 @@ const StickerSheetTemplate: StickerSheetStory = {
"data-testid": "test__filter-drp-field--validation--end",
}}
/>
+
diff --git a/packages/components/src/Filter/FilterDateRangePicker/subcomponents/DateRangeInputField/DateRangeInputField.spec.tsx b/packages/components/src/Filter/FilterDateRangePicker/subcomponents/DateRangeInputField/DateRangeInputField.spec.tsx
index 3d35f9d4ad3..1aace323dc4 100644
--- a/packages/components/src/Filter/FilterDateRangePicker/subcomponents/DateRangeInputField/DateRangeInputField.spec.tsx
+++ b/packages/components/src/Filter/FilterDateRangePicker/subcomponents/DateRangeInputField/DateRangeInputField.spec.tsx
@@ -1,8 +1,8 @@
import React, { useRef } from "react"
-import { screen, waitFor } from "@testing-library/react"
+import { screen, waitFor, render } from "@testing-library/react"
import userEvent from "@testing-library/user-event"
import { enAU } from "date-fns/locale"
-import { renderWithIntl } from "~tests"
+import { vi } from "vitest"
import {
DateRangeInputField,
DateRangeInputFieldProps,
@@ -25,9 +25,7 @@ const DateRangeInputFieldWrapper = (
describe(" ", () => {
it("has unique ids for both inputs", async () => {
- const { container } = renderWithIntl(
-
- )
+ const { container } = render( )
const inputStart = container.querySelector("#range--from")
const inputEnd = container.querySelector("#range--to")
await waitFor(() => {
@@ -37,14 +35,14 @@ describe(" ", () => {
})
it("has an accessible name for the fieldset", async () => {
- renderWithIntl( )
+ render( )
await waitFor(() => {
expect(screen.getByRole("group", { name: "Dates" })).toBeVisible()
})
})
it("adds description to both inputs", async () => {
- renderWithIntl( )
+ render( )
const inputStart = screen.getByRole("textbox", { name: "Date from" })
const inputEnd = screen.getByRole("textbox", { name: "Date to" })
await waitFor(() => {
@@ -56,7 +54,7 @@ describe(" ", () => {
})
it("adds validation message to description if it exists", async () => {
- renderWithIntl(
+ render(
", () => {
describe("Disabled", () => {
it("disables both inputs", async () => {
- renderWithIntl( )
+ render( )
const inputStart = screen.getByRole("textbox", { name: "Date from" })
const inputEnd = screen.getByRole("textbox", { name: "Date to" })
await waitFor(() => {
@@ -89,7 +87,7 @@ describe(" ", () => {
describe("Refs", () => {
it("correctly passes through both input refs", async () => {
- const onButtonClick = jest.fn()
+ const onButtonClick = vi.fn()
const Wrapper = (): JSX.Element => {
const inputStartDateRef = useRef(null)
@@ -119,7 +117,7 @@ describe(" ", () => {
)
}
- renderWithIntl( )
+ render( )
await user.click(screen.getByText("Click me"))
expect(onButtonClick).toHaveBeenCalledWith(
diff --git a/packages/components/src/Filter/FilterDateRangePicker/subcomponents/DateRangeValidationMessage/DateRangeValidationMessage.spec.tsx b/packages/components/src/Filter/FilterDateRangePicker/subcomponents/DateRangeValidationMessage/DateRangeValidationMessage.spec.tsx
index 7fc3b4d2669..5767f4e690e 100644
--- a/packages/components/src/Filter/FilterDateRangePicker/subcomponents/DateRangeValidationMessage/DateRangeValidationMessage.spec.tsx
+++ b/packages/components/src/Filter/FilterDateRangePicker/subcomponents/DateRangeValidationMessage/DateRangeValidationMessage.spec.tsx
@@ -1,70 +1,8 @@
import React from "react"
-import { render, screen, within } from "@testing-library/react"
+import { render } from "@testing-library/react"
import { DateRangeValidationMessage } from "./DateRangeValidationMessage"
describe(" ", () => {
- describe("when the consumer has given it a node", () => {
- it("will render a single validation field message", () => {
- render(
- Validation message
,
- },
- }}
- />
- )
- expect(screen.getByText("Validation message")).toBeVisible()
- })
-
- it("combines multiple validation messages with the same status", () => {
- const { container } = render(
-
- )
- const validationList = screen.getByRole("list")
- const { getAllByRole } = within(validationList)
- const items = getAllByRole("listitem")
-
- expect(items.length).toBe(2)
- expect(container.getElementsByClassName("error").length).toBe(1)
- })
- })
-
- describe("when consumer passes validationMessage object and has different status", () => {
- it("will render two validation field messages", () => {
- const { container } = render(
-
- )
- expect(container.getElementsByClassName("error").length).toBe(1)
- expect(container.getElementsByClassName("caution").length).toBe(1)
- })
- })
-
it("renders an id when passed in", () => {
const { container } = render(
=> {
describe(" ", () => {
describe("Inputs", () => {
it("has empty inputs when a date range is not provided", async () => {
- renderWithIntl( )
+ render( )
await waitForI18nContent()
const inputStartDate = screen.getByLabelText("Date from")
@@ -46,7 +46,7 @@ describe(" ", () => {
})
it("pre-fills the inputs when date range is provided", async () => {
- renderWithIntl(
+ render(
", () => {
})
it("allows customising the input labels", async () => {
- renderWithIntl(
+ render(
", () => {
describe("onBlur", () => {
it("updates start date input and calendar values correctly on blur", async () => {
- const startDateOnBlur = jest.fn()
- const endDateOnBlur = jest.fn()
+ const startDateOnBlur = vi.fn()
+ const endDateOnBlur = vi.fn()
- renderWithIntl(
+ render(
", () => {
})
it("updates end date input and calendar values correctly on blur", async () => {
- const startDateOnBlur = jest.fn()
- const endDateOnBlur = jest.fn()
+ const startDateOnBlur = vi.fn()
+ const endDateOnBlur = vi.fn()
- renderWithIntl(
+ render(
", () => {
})
it("updates the calendar month to match the new start date input", async () => {
- renderWithIntl(
+ render(
", () => {
describe("Calendar", () => {
it("shows the default month as the start month when there isn't a selected value", async () => {
- renderWithIntl(
+ render(
@@ -211,7 +211,7 @@ describe(" ", () => {
})
it("shows the selected start date month as the start month when provided", async () => {
- renderWithIntl(
+ render(
", () => {
})
it("shows the current month as the start month when selected start date is invalid", async () => {
- renderWithIntl(
+ render(
", () => {
})
it("updates the range start input when changing the start date", async () => {
- renderWithIntl(
+ render(
", () => {
})
it("updates the range end input when changing the end date", async () => {
- renderWithIntl(
+ render(
", () => {
})
it("clears the inputs when clearing the calendar value", async () => {
- renderWithIntl(
+ render(
", () => {
describe("Custom validation", () => {
it("shows validation messages passed in from the consumer", async () => {
- renderWithIntl(
+ render(
undefined,
@@ -359,7 +359,7 @@ describe(" ", () => {
describe("Inbuilt validation", () => {
it("shows inbuilt validation messages for start date", async () => {
- const { container } = renderWithIntl(
+ const { container } = render(
@@ -385,7 +385,7 @@ describe(" ", () => {
})
it("shows inbuilt validation messages for end date", async () => {
- const { container } = renderWithIntl(
+ const { container } = render(
@@ -408,7 +408,7 @@ describe(" ", () => {
})
it("shows inbuilt validation messages for pre-existing values", async () => {
- const { container } = renderWithIntl(
+ const { container } = render(
", () => {
'Date to:Cannot be earlier than the selection in "Date from"'
it("shows error on updating end date input to be before start date", async () => {
- const { container } = renderWithIntl(
+ const { container } = render(
", () => {
})
it("removes error on updating start date input to be before end date", async () => {
- const { container } = renderWithIntl(
+ const { container } = render(
", () => {
})
it("displays only one date when the start date input is set to be before the end date", async () => {
- const { container } = renderWithIntl(
+ const { container } = render(
", () => {
})
it("shows error on updating start date input to be after end date", async () => {
- const { container } = renderWithIntl(
+ const { container } = render(
", () => {
})
it("shows error if the pre-existing end date is before start date", async () => {
- const { container } = renderWithIntl(
+ const { container } = render(
", () => {
describe("Combined validation", () => {
it("shows custom start date validation with inbuilt end date validation", async () => {
- const { container } = renderWithIntl(
+ const { container } = render(
undefined,
@@ -621,7 +621,7 @@ describe(" ", () => {
})
it("shows custom end date validation with inbuilt start date validation", async () => {
- const { container } = renderWithIntl(
+ const { container } = render(
undefined,
@@ -656,7 +656,7 @@ describe(" ", () => {
})
it("re-validates values when selecting a value using the calendar", async () => {
- const { container } = renderWithIntl(
+ const { container } = render(
", () => {
})
it("only returns a valid date to the onRangeChange function", async () => {
- const onRangeChange = jest.fn()
+ const onRangeChange = vi.fn()
- const { getByLabelText } = renderWithIntl(
+ const { getByLabelText } = render(
{
@@ -25,9 +24,7 @@ describe("useEndDateValidation()", () => {
expect(result.current.validationMessage?.status).toBe("error")
- const { container } = renderWithIntl(
- result.current.validationMessage?.message
- )
+ const { container } = render(result.current.validationMessage?.message)
await waitFor(() => {
expect(container).toHaveTextContent(
"End date:potato is an invalid date"
@@ -57,9 +54,7 @@ describe("useEndDateValidation()", () => {
expect(result.current.validationMessage?.status).toBe("error")
- const { container } = renderWithIntl(
- result.current.validationMessage?.message
- )
+ const { container } = render(result.current.validationMessage?.message)
await waitFor(() => {
expect(container).toHaveTextContent(
'Cannot be earlier than the selection in "Start date"'
diff --git a/packages/components/src/Filter/FilterDateRangePicker/subcomponents/FilterDateRangePickerField/hooks/useStartDateValidation.spec.ts b/packages/components/src/Filter/FilterDateRangePicker/subcomponents/FilterDateRangePickerField/hooks/useStartDateValidation.spec.ts
index 0adf610adda..925baf93f75 100644
--- a/packages/components/src/Filter/FilterDateRangePicker/subcomponents/FilterDateRangePickerField/hooks/useStartDateValidation.spec.ts
+++ b/packages/components/src/Filter/FilterDateRangePicker/subcomponents/FilterDateRangePickerField/hooks/useStartDateValidation.spec.ts
@@ -1,6 +1,5 @@
import { act } from "react"
-import { waitFor, renderHook } from "@testing-library/react"
-import { renderWithIntl } from "~tests"
+import { waitFor, renderHook, render } from "@testing-library/react"
import { useStartDateValidation } from "./useStartDateValidation"
describe("useStartDateValidation()", () => {
@@ -23,9 +22,7 @@ describe("useStartDateValidation()", () => {
expect(result.current.validationMessage?.status).toBe("error")
- const { container } = renderWithIntl(
- result.current.validationMessage?.message
- )
+ const { container } = render(result.current.validationMessage?.message)
await waitFor(() => {
expect(container).toHaveTextContent(
"Start date:potato is an invalid date"
diff --git a/packages/components/src/Filter/FilterDateRangePicker/subcomponents/FilterDateRangePickerField/utils/validateEndDateBeforeStartDate.spec.ts b/packages/components/src/Filter/FilterDateRangePicker/subcomponents/FilterDateRangePickerField/utils/validateEndDateBeforeStartDate.spec.ts
index 1d54686ec23..880d12c66c9 100644
--- a/packages/components/src/Filter/FilterDateRangePicker/subcomponents/FilterDateRangePickerField/utils/validateEndDateBeforeStartDate.spec.ts
+++ b/packages/components/src/Filter/FilterDateRangePicker/subcomponents/FilterDateRangePickerField/utils/validateEndDateBeforeStartDate.spec.ts
@@ -1,5 +1,4 @@
-import { screen, waitFor } from "@testing-library/react"
-import { renderWithIntl } from "~tests"
+import { screen, waitFor, render } from "@testing-library/react"
import { validateEndDateBeforeStartDate } from "./validateEndDateBeforeStartDate"
describe("validateEndDateBeforeStartDate()", () => {
@@ -99,7 +98,7 @@ describe("validateEndDateBeforeStartDate()", () => {
expect(validationMessage?.status).toBe("error")
- renderWithIntl(validationMessage?.message)
+ render(validationMessage?.message)
await waitFor(() => {
expect(
screen.getByText(
diff --git a/packages/components/src/Filter/FilterMultiSelect/FilterMultiSelect.spec.tsx b/packages/components/src/Filter/FilterMultiSelect/FilterMultiSelect.spec.tsx
index af49fdefecf..480c0ffa475 100644
--- a/packages/components/src/Filter/FilterMultiSelect/FilterMultiSelect.spec.tsx
+++ b/packages/components/src/Filter/FilterMultiSelect/FilterMultiSelect.spec.tsx
@@ -1,8 +1,7 @@
import React, { useState } from "react"
import { Selection } from "@react-types/shared"
-import { waitFor } from "@testing-library/react"
+import { waitFor, render } from "@testing-library/react"
import userEvent from "@testing-library/user-event"
-import { renderWithIntl } from "~tests"
import { FilterMultiSelect, FilterMultiSelectProps } from "./FilterMultiSelect"
import { ItemType } from "./types"
import { getSelectedOptionLabels } from "./utils"
@@ -74,7 +73,7 @@ const FilterMultiSelectWrapper = ({
describe("", () => {
it("opens the popover using the trigger button", async () => {
- const { getByRole } = renderWithIntl( )
+ const { getByRole } = render( )
const triggerButton = getByRole("button", { name: "Engineer : Front-End" })
await user.click(triggerButton)
@@ -85,7 +84,7 @@ describe("", () => {
})
it("selects an unselected option on click", async () => {
- const { getByRole } = renderWithIntl( )
+ const { getByRole } = render( )
const devOpsOption = getByRole("option", {
name: "Dev-ops",
@@ -99,7 +98,7 @@ describe("", () => {
})
it("deselects a selected option on click", async () => {
- const { getByRole } = renderWithIntl( )
+ const { getByRole } = render( )
const devOpsOption = getByRole("option", {
name: "Front-End",
@@ -113,7 +112,7 @@ describe("", () => {
})
it("filters out options which do not match the search term", async () => {
- const { getByRole, getAllByRole } = renderWithIntl(
+ const { getByRole, getAllByRole } = render(
)
expect(getAllByRole("option")).toHaveLength(5)
@@ -127,7 +126,7 @@ describe("", () => {
describe("Clear button", () => {
it("deselects all options when unfiltered", async () => {
- const { getByRole, queryAllByRole } = renderWithIntl(
+ const { getByRole, queryAllByRole } = render(
", () => {
})
it("deselects only selected filtered options", async () => {
- const { getByRole, queryAllByRole } = renderWithIntl(
+ const { getByRole, queryAllByRole } = render(
", () => {
options.filter(option => option.hasAttribute("aria-disabled"))
it("selects all non-disabled options when unfiltered", async () => {
- const { getByRole, queryAllByRole } = renderWithIntl(
+ const { getByRole, queryAllByRole } = render(
)
@@ -187,7 +186,7 @@ describe("", () => {
})
it("selects only non-disabled filtered options", async () => {
- const { getByRole, queryAllByRole } = renderWithIntl(
+ const { getByRole, queryAllByRole } = render(
)
diff --git a/packages/components/src/Filter/FilterMultiSelect/context/MenuTriggerProvider/MenuTriggerProvider.spec.tsx b/packages/components/src/Filter/FilterMultiSelect/context/MenuTriggerProvider/MenuTriggerProvider.spec.tsx
index e15d2f1b497..2bff747f078 100644
--- a/packages/components/src/Filter/FilterMultiSelect/context/MenuTriggerProvider/MenuTriggerProvider.spec.tsx
+++ b/packages/components/src/Filter/FilterMultiSelect/context/MenuTriggerProvider/MenuTriggerProvider.spec.tsx
@@ -1,6 +1,7 @@
import React from "react"
import { render, screen, waitFor } from "@testing-library/react"
import userEvent from "@testing-library/user-event"
+import { vi } from "vitest"
import { FilterTriggerButton } from "~components/Filter/FilterMultiSelect/subcomponents/Trigger"
import { MenuPopup } from "../../subcomponents/MenuPopup"
import {
@@ -59,7 +60,7 @@ describe(" - Visual content", () => {
})
it("fires the onOpenChange callback when the trigger is interacted", async () => {
- const onOpenChange = jest.fn()
+ const onOpenChange = vi.fn()
render( )
const trigger = screen.getByRole("button", {
diff --git a/packages/components/src/Filter/FilterMultiSelect/context/SelectionProvider/SelectionProvider.spec.tsx b/packages/components/src/Filter/FilterMultiSelect/context/SelectionProvider/SelectionProvider.spec.tsx
index 7d2fc70980f..4fb84b6ae9d 100644
--- a/packages/components/src/Filter/FilterMultiSelect/context/SelectionProvider/SelectionProvider.spec.tsx
+++ b/packages/components/src/Filter/FilterMultiSelect/context/SelectionProvider/SelectionProvider.spec.tsx
@@ -1,9 +1,9 @@
import React, { useState } from "react"
import { StaticIntlProvider } from "@cultureamp/i18n-react-intl"
import { Selection } from "@react-types/shared"
-import { screen, waitFor } from "@testing-library/react"
+import { screen, waitFor, render } from "@testing-library/react"
import userEvent from "@testing-library/user-event"
-import { renderWithIntl } from "~tests"
+import { vi } from "vitest"
import { FilterMultiSelect } from "../../FilterMultiSelect"
import { ListBox } from "../../subcomponents/ListBox"
import { SearchInput } from "../../subcomponents/SearchInput"
@@ -104,7 +104,7 @@ describe("", () => {
describe(" - Visual content", () => {
describe("Given no selectedKeys", () => {
it("shows all the options unselected", async () => {
- renderWithIntl( )
+ render( )
await waitFor(() => {
expect(
screen.getByRole("option", {
@@ -128,7 +128,7 @@ describe("", () => {
})
it("labels the listbox with the provided label", async () => {
- renderWithIntl( )
+ render( )
await waitFor(() => {
const listBox = screen.getByLabelText("selection-label-mock", {
selector: "ul",
@@ -140,7 +140,7 @@ describe("", () => {
describe("Given selectedKeys is [option-2-value-mock]", () => {
it("shows only option 2 is selected", async () => {
- renderWithIntl(
+ render(
@@ -170,7 +170,7 @@ describe("", () => {
describe("Given selectedKeys is 'all'", () => {
it("shows all options are selected", async () => {
- renderWithIntl( )
+ render( )
await waitFor(() => {
expect(
screen.getByRole("option", {
@@ -197,7 +197,7 @@ describe("", () => {
describe(" - Mouse interaction", () => {
it("selects the option when clicks on a non-selected option", async () => {
- renderWithIntl( )
+ render( )
const option1 = screen.getByRole("option", {
name: "option-1-label-mock",
})
@@ -215,8 +215,8 @@ describe("", () => {
})
it("fires onSelectionChange when clicks on a option", async () => {
- const spy = jest.fn()
- renderWithIntl( )
+ const spy = vi.fn()
+ render( )
const option1 = screen.getByRole("option", {
name: "option-1-label-mock",
})
@@ -229,7 +229,7 @@ describe("", () => {
})
it("selects all options when clicks on Select all button", async () => {
- renderWithIntl( )
+ render( )
const selectAll = screen.getByRole("button", {
name: "Select all",
})
@@ -261,8 +261,8 @@ describe("", () => {
})
it("fires onSelectionChange when clicks on Select all button", async () => {
- const spy = jest.fn()
- renderWithIntl( )
+ const spy = vi.fn()
+ render( )
const selectAll = screen.getByRole("button", {
name: "Select all",
})
@@ -275,7 +275,7 @@ describe("", () => {
})
it("clears all the selection when clicks on Clear button", async () => {
- renderWithIntl(
+ render(
@@ -309,8 +309,8 @@ describe("", () => {
})
it("fires onSelectionChange when clicks on Clear all button", async () => {
- const spy = jest.fn()
- renderWithIntl(
+ const spy = vi.fn()
+ render(
", () => {
})
it("de-selects the option when clicks on a selected option", async () => {
- renderWithIntl(
+ render(
@@ -354,7 +354,7 @@ describe("", () => {
describe(" - Keyboard interaction", () => {
describe("Given no selectedKeys", () => {
it("focuses on the frist option when tabs onto the list", async () => {
- renderWithIntl( )
+ render( )
await user.tab()
await waitFor(() => {
@@ -367,7 +367,7 @@ describe("", () => {
describe("Given selectedKeys is [option-2-value-mock, option-3-value-mock]", () => {
it("focuses the frist selected option when tabs onto the list", async () => {
- renderWithIntl(
+ render(
@@ -383,7 +383,7 @@ describe("", () => {
})
it("moves the focus down when hits arrow down key", async () => {
- renderWithIntl( )
+ render( )
await user.tab()
await user.keyboard("{ArrowDown}")
@@ -395,7 +395,7 @@ describe("", () => {
})
it("keeps the focus at the last element when hits arrow down key on it", async () => {
- renderWithIntl(
+ render(
@@ -411,7 +411,7 @@ describe("", () => {
})
it("moves the focus up when hits arrow up key", async () => {
- renderWithIntl(
+ render(
@@ -427,7 +427,7 @@ describe("", () => {
})
it("keeps the focus ring at the first element when hits arrow up key on it", async () => {
- renderWithIntl( )
+ render( )
await user.tab()
await user.keyboard("{ArrowUp}")
@@ -439,7 +439,7 @@ describe("", () => {
})
it("selects the option when hits enter on a non-selected option", async () => {
- renderWithIntl( )
+ render( )
await user.tab()
await user.keyboard("{Enter}")
@@ -455,7 +455,7 @@ describe("", () => {
})
it("de-selects the option when hits enter on a selected option", async () => {
- renderWithIntl(
+ render(
@@ -475,8 +475,8 @@ describe("", () => {
})
it("fires onSelectionChange when hits enter on a option", async () => {
- const spy = jest.fn()
- renderWithIntl( )
+ const spy = vi.fn()
+ render( )
await user.tab()
await user.keyboard("{Enter}")
@@ -490,7 +490,7 @@ describe("", () => {
describe(" - Search Filtering", () => {
describe("With no onSearchInputChange callback", () => {
it("shows only the matched options", async () => {
- renderWithIntl( )
+ render( )
const searchInput = screen.getByRole("searchbox")
await user.type(searchInput, "1")
@@ -515,9 +515,9 @@ describe("", () => {
})
describe("With a onSearchInputChange callback", () => {
it("Does not filter the matched options", async () => {
- const onSearchInputChange = jest.fn()
+ const onSearchInputChange = vi.fn()
- renderWithIntl(
+ render(
)
const searchInput = screen.getByRole("searchbox")
@@ -544,9 +544,9 @@ describe("", () => {
})
it("Calls back to the consumer with the search text", async () => {
- const onSearchInputChange = jest.fn()
+ const onSearchInputChange = vi.fn()
- renderWithIntl(
+ render(
)
const searchInput = screen.getByRole("searchbox")
@@ -563,7 +563,7 @@ describe("", () => {
describe(" - controlling items from the consumer", () => {
it("renders only items passed", async () => {
- const { rerender } = renderWithIntl( )
+ const { rerender } = render( )
await waitFor(() => {
expect(
screen.getByRole("option", {
diff --git a/packages/components/src/Filter/FilterMultiSelect/subcomponents/MultiSelectOption/MultiSelectOption.spec.tsx b/packages/components/src/Filter/FilterMultiSelect/subcomponents/MultiSelectOption/MultiSelectOption.spec.tsx
index cd76f713b91..5410706e697 100644
--- a/packages/components/src/Filter/FilterMultiSelect/subcomponents/MultiSelectOption/MultiSelectOption.spec.tsx
+++ b/packages/components/src/Filter/FilterMultiSelect/subcomponents/MultiSelectOption/MultiSelectOption.spec.tsx
@@ -3,14 +3,16 @@
import React from "react"
import { useOption } from "@react-aria/listbox"
import { render, screen } from "@testing-library/react"
+import { vi, beforeEach, Mock } from "vitest"
import { ItemType } from "../../types"
import { MultiSelectOption, MultiSelectOptionProps } from "./MultiSelectOption"
+import styles from "./MultiSelectOption.module.scss"
-jest.mock("@react-aria/listbox", () => ({
- useOption: jest.fn(),
+vi.mock("@react-aria/listbox", () => ({
+ useOption: vi.fn(),
}))
-jest.mock("../../context", () => ({
+vi.mock("../../context", () => ({
useSelectionContext: (): { selectionState: Record } => ({
selectionState: {},
}),
@@ -36,7 +38,7 @@ const MultiSelectOptionWrapper = ({
describe(" - Visual content", () => {
describe("Given item is unselected", () => {
beforeEach(() => {
- ;(useOption as jest.Mock).mockReturnValue({
+ ;(useOption as Mock).mockReturnValue({
optionProps: {},
isSelected: false,
isDisabled: false,
@@ -56,7 +58,7 @@ describe(" - Visual content", () => {
describe("Given item is disabled", () => {
beforeEach(() => {
- ;(useOption as jest.Mock).mockReturnValue({
+ ;(useOption as Mock).mockReturnValue({
optionProps: {},
isSelected: false,
isDisabled: true,
@@ -66,13 +68,13 @@ describe(" - Visual content", () => {
it("has a disabled class", () => {
const label = screen.getByLabelText("label-mock")
- expect(label).toHaveClass("isDisabled")
+ expect(label).toHaveClass(styles.isDisabled)
})
})
describe("Given count is provided", () => {
beforeEach(() => {
- ;(useOption as jest.Mock).mockReturnValue({
+ ;(useOption as Mock).mockReturnValue({
optionProps: {},
isSelected: false,
isDisabled: false,
diff --git a/packages/components/src/Filter/FilterMultiSelect/subcomponents/SearchInput/SearchInput.spec.tsx b/packages/components/src/Filter/FilterMultiSelect/subcomponents/SearchInput/SearchInput.spec.tsx
index 41693d5274a..7b9180bba66 100644
--- a/packages/components/src/Filter/FilterMultiSelect/subcomponents/SearchInput/SearchInput.spec.tsx
+++ b/packages/components/src/Filter/FilterMultiSelect/subcomponents/SearchInput/SearchInput.spec.tsx
@@ -1,14 +1,14 @@
import React from "react"
-import { screen, waitFor } from "@testing-library/react"
+import { screen, waitFor, render } from "@testing-library/react"
import userEvent from "@testing-library/user-event"
-import { renderWithIntl } from "~tests"
+import { vi, Mock } from "vitest"
import { useSelectionContext } from "../../context"
import { SearchInput } from "."
const user = userEvent.setup()
-jest.mock("../../context", () => ({
- useSelectionContext: jest.fn(),
+vi.mock("../../context", () => ({
+ useSelectionContext: vi.fn(),
}))
const SearchInputWrapper = (): JSX.Element =>
@@ -16,10 +16,10 @@ const SearchInputWrapper = (): JSX.Element =>
describe(" - interaction", () => {
describe("Given searchQuery is provided", () => {
it("shows searchQuery as value", async () => {
- ;(useSelectionContext as jest.Mock).mockReturnValue({
+ ;(useSelectionContext as Mock).mockReturnValue({
searchQuery: "search-query-mock",
})
- renderWithIntl( )
+ render( )
await waitFor(() => {
expect(screen.getByRole("searchbox")).toHaveValue("search-query-mock")
})
@@ -27,12 +27,12 @@ describe(" - interaction", () => {
})
it("triggers setSearchQuery with input value when user types the input", async () => {
- const spy = jest.fn()
- ;(useSelectionContext as jest.Mock).mockReturnValue({
+ const spy = vi.fn()
+ ;(useSelectionContext as Mock).mockReturnValue({
setSearchQuery: spy,
})
- renderWithIntl( )
+ render( )
const search = screen.getByRole("searchbox")
await user.type(search, "want to search this text")
@@ -40,13 +40,13 @@ describe(" - interaction", () => {
})
it("triggers setSearchQuery with input value when clear the input", async () => {
- const spy = jest.fn()
- ;(useSelectionContext as jest.Mock).mockReturnValue({
+ const spy = vi.fn()
+ ;(useSelectionContext as Mock).mockReturnValue({
searchQuery: "search-query-mock",
setSearchQuery: spy,
})
- renderWithIntl( )
+ render( )
const clearButton = screen.getByRole("button")
await user.click(clearButton)
diff --git a/packages/components/src/Filter/FilterMultiSelect/subcomponents/SelectionControlButton/ClearButton/ClearButton.spec.tsx b/packages/components/src/Filter/FilterMultiSelect/subcomponents/SelectionControlButton/ClearButton/ClearButton.spec.tsx
index c6bd037bf44..928e46f2f34 100644
--- a/packages/components/src/Filter/FilterMultiSelect/subcomponents/SelectionControlButton/ClearButton/ClearButton.spec.tsx
+++ b/packages/components/src/Filter/FilterMultiSelect/subcomponents/SelectionControlButton/ClearButton/ClearButton.spec.tsx
@@ -1,24 +1,24 @@
import React from "react"
import { render, screen, waitFor } from "@testing-library/react"
import userEvent from "@testing-library/user-event"
+import { Mock, vi } from "vitest"
import { useSelectionContext } from "../../../context"
import { ClearButton } from "."
-
const user = userEvent.setup()
-jest.mock("../../../context", () => ({
- useSelectionContext: jest.fn(),
+vi.mock("../../../context", () => ({
+ useSelectionContext: vi.fn(),
}))
describe(" - interaction", () => {
describe("Given selection is not empty", () => {
it("triggers selectionManager.selSelectedKeys() with focused keys filtered out when button is clicked", async () => {
- const spy = jest.fn()
+ const spy = vi.fn()
const selectedAndFocused = "selectedAndFocused"
const selectedButNotFocused = "selectedButNotFocused"
const selectedKeys: string[] = [selectedAndFocused, selectedButNotFocused]
const filteredKeys: string[] = [selectedAndFocused]
- ;(useSelectionContext as jest.Mock).mockReturnValue({
+ ;(useSelectionContext as Mock).mockReturnValue({
selectionState: {
collection: {
getKeys: () => filteredKeys,
@@ -43,10 +43,10 @@ describe(" - interaction", () => {
describe("Given selection is empty", () => {
it("does not trigger selectionManager.setSelectedKeys() when clicks on the button", async () => {
- const spy = jest.fn()
+ const spy = vi.fn()
const filteredKeys: string[] = []
const selectedKeys: string[] = []
- ;(useSelectionContext as jest.Mock).mockReturnValue({
+ ;(useSelectionContext as Mock).mockReturnValue({
selectionState: {
collection: {
getKeys: () => filteredKeys,
diff --git a/packages/components/src/Filter/FilterMultiSelect/subcomponents/SelectionControlButton/SelectAllButton/SelectAllButton.spec.tsx b/packages/components/src/Filter/FilterMultiSelect/subcomponents/SelectionControlButton/SelectAllButton/SelectAllButton.spec.tsx
index a2ce34b6e9f..6e9122a6c8a 100644
--- a/packages/components/src/Filter/FilterMultiSelect/subcomponents/SelectionControlButton/SelectAllButton/SelectAllButton.spec.tsx
+++ b/packages/components/src/Filter/FilterMultiSelect/subcomponents/SelectionControlButton/SelectAllButton/SelectAllButton.spec.tsx
@@ -1,26 +1,26 @@
import React from "react"
import { render, screen, waitFor } from "@testing-library/react"
import userEvent from "@testing-library/user-event"
+import { Mock, vi } from "vitest"
import { useSelectionContext } from "../../../context"
import { SelectAllButton } from "."
-
const user = userEvent.setup()
-jest.mock("../../../context", () => ({
- useSelectionContext: jest.fn(),
+vi.mock("../../../context", () => ({
+ useSelectionContext: vi.fn(),
}))
describe(" - interaction", () => {
describe("Given not all options are selected", () => {
it("triggers selectionManager.setSelectedKeys() with currently selected and filtered options when button is clicked", async () => {
- const spy = jest.fn()
+ const spy = vi.fn()
const selectedAndFiltered = "selectedAndFiltered"
const filteredButNotSelected = "focusedButNotSelected"
const selectedButNotFiltered = "selectedButNotFiltered"
const selectedKeys = [selectedAndFiltered, selectedButNotFiltered]
const filteredKeys = [selectedAndFiltered, filteredButNotSelected]
- ;(useSelectionContext as jest.Mock).mockReturnValue({
+ ;(useSelectionContext as Mock).mockReturnValue({
selectionState: {
collection: {
getKeys: () => filteredKeys,
@@ -45,12 +45,12 @@ describe(" - interaction", () => {
describe("Given all filtered options are selected", () => {
it("does not trigger selectionManager.setSelectedKeys() when clicks on the button", async () => {
- const spy = jest.fn()
+ const spy = vi.fn()
const selectedAndFiltered1 = "selectedAndFiltered1"
const selectedAndFiltered2 = "selectedAndFocused2"
const selectedKeys = [selectedAndFiltered1, selectedAndFiltered2]
const filteredKeys = [selectedAndFiltered1, selectedAndFiltered2]
- ;(useSelectionContext as jest.Mock).mockReturnValue({
+ ;(useSelectionContext as Mock).mockReturnValue({
selectionState: {
collection: {
getKeys: () => filteredKeys,
@@ -74,7 +74,7 @@ describe(" - interaction", () => {
describe("Given some options are disabled", () => {
it("triggers selectionManager.setSelectedKeys() on non-disabled options", async () => {
- const spy = jest.fn()
+ const spy = vi.fn()
const filtered = "filtered"
const filteredAndSelected = "filteredAndSelected"
const filteredAndDisabled = "filteredAndDisabled"
@@ -82,7 +82,7 @@ describe(" - interaction", () => {
const filteredKeys = [filtered, filteredAndSelected, filteredAndDisabled]
const disabledKeys = [filteredAndDisabled]
- ;(useSelectionContext as jest.Mock).mockReturnValue({
+ ;(useSelectionContext as Mock).mockReturnValue({
selectionState: {
disabledKeys,
collection: {
diff --git a/packages/components/src/Filter/FilterSelect/FilterSelect.spec.tsx b/packages/components/src/Filter/FilterSelect/FilterSelect.spec.tsx
index 71b5a272c44..8206b164585 100644
--- a/packages/components/src/Filter/FilterSelect/FilterSelect.spec.tsx
+++ b/packages/components/src/Filter/FilterSelect/FilterSelect.spec.tsx
@@ -180,7 +180,7 @@ const defaultProps: FilterSelectProps = {
items: singleMockItems,
}
-/* eslint-disable jest/expect-expect */
+/* eslint-disable vitest/expect-expect */
describe("FilterSelect generic", () => {
it("should prevent adding `options` attribute to option", () => {
/* @ts-expect-error */
@@ -213,4 +213,4 @@ describe("FilterSelect generic", () => {
})
})
})
-/* eslint-enable jest/expect-expect */
+/* eslint-enable vitest/expect-expect */
diff --git a/packages/components/src/Heading/Heading.spec.tsx b/packages/components/src/Heading/Heading.spec.tsx
index 693cc3abd86..894a7048482 100644
--- a/packages/components/src/Heading/Heading.spec.tsx
+++ b/packages/components/src/Heading/Heading.spec.tsx
@@ -1,37 +1,8 @@
import * as React from "react"
import { render } from "@testing-library/react"
-import { AllowedHeadingTags, Heading, HeadingVariants } from "./"
+import { AllowedHeadingTags, Heading, HeadingVariants } from "."
describe(" ", () => {
- it("renders the correct classes", () => {
- const headingMock = render(Example )
- const headingClasslist = headingMock.getByText("Example").classList
- expect(headingClasslist).toContain("heading")
- expect(headingClasslist).toContain("display-0")
- expect(headingClasslist).toContain("large")
- })
-
- it("adds a .small class instead of .large if a Heading 3 is used", () => {
- const headingMock = render(
-
- Example
-
- )
- expect(headingMock.getByText("Example").classList).toContain("small")
- expect(headingMock.getByText("Example").classList).not.toContain("large")
- })
-
- it("adds a .dark-reduced-opacity class if the color prop is set to that", () => {
- const headingMock = render(
-
- Example
-
- )
- expect(headingMock.getByText("Example").classList).toContain(
- "dark-reduced-opacity"
- )
- })
-
it("changes rendered HTML element when passed tag", () => {
const headingMock = render(
@@ -66,7 +37,6 @@ describe(" ", () => {
it(`renders the correct element for `, () => {
const headingMock = render(Example )
expect(headingMock.getByText("Example").tagName.toLowerCase()).toBe(el)
- expect(headingMock.baseElement).toMatchSnapshot()
})
})
})
diff --git a/packages/components/src/Heading/__snapshots__/Heading.spec.tsx.snap b/packages/components/src/Heading/__snapshots__/Heading.spec.tsx.snap
deleted file mode 100644
index 43f1d4e1d41..00000000000
--- a/packages/components/src/Heading/__snapshots__/Heading.spec.tsx.snap
+++ /dev/null
@@ -1,85 +0,0 @@
-// Jest Snapshot v1, https://goo.gl/fbAQLP
-
-exports[` defaults to the correct HTML element renders the correct element for 1`] = `
-
-
-
- Example
-
-
-
-`;
-
-exports[` defaults to the correct HTML element renders the correct element for 1`] = `
-
-
-
- Example
-
-
-
-`;
-
-exports[` defaults to the correct HTML element renders the correct element for 1`] = `
-
-
-
- Example
-
-
-
-`;
-
-exports[` defaults to the correct HTML element renders the correct element for 1`] = `
-
-
-
- Example
-
-
-
-`;
-
-exports[` defaults to the correct HTML element renders the correct element for 1`] = `
-
-
-
- Example
-
-
-
-`;
-
-exports[` defaults to the correct HTML element renders the correct element for 1`] = `
-
-
-
- Example
-
-
-
-`;
-
-exports[` defaults to the correct HTML element renders the correct element for 1`] = `
-
-
-
- Example
-
-
-
-`;
diff --git a/packages/components/src/Illustration/subcomponents/VideoPlayer/VideoPlayer.spec.tsx b/packages/components/src/Illustration/subcomponents/VideoPlayer/VideoPlayer.spec.tsx
index ab655d04e6c..1ac3cbdb339 100644
--- a/packages/components/src/Illustration/subcomponents/VideoPlayer/VideoPlayer.spec.tsx
+++ b/packages/components/src/Illustration/subcomponents/VideoPlayer/VideoPlayer.spec.tsx
@@ -1,15 +1,15 @@
import React from "react"
import { render, screen } from "@testing-library/react"
-import userEvent from "@testing-library/user-event"
+import { vi } from "vitest"
import { VideoPlayer } from "./VideoPlayer"
const matchMedia = {
media: "",
onchange: null,
- addListener: jest.fn(),
- removeListener: jest.fn(),
- addEventListener: jest.fn(),
- removeEventListener: jest.fn(),
+ addListener: vi.fn(),
+ removeListener: vi.fn(),
+ addEventListener: vi.fn(),
+ removeEventListener: vi.fn(),
}
const mockPrefersReducedMotion = {
matches: true,
@@ -19,35 +19,36 @@ const mockDoesNotPreferReducedMotion = {
matches: false,
...matchMedia,
}
-const mockPlay = jest.fn().mockResolvedValue(undefined)
-const mockLoad = jest.fn()
-const mockPause = jest.fn()
+const mockPlay = vi.fn().mockResolvedValue(undefined)
+const mockLoad = vi.fn()
+const mockPause = vi.fn()
describe(" ", () => {
beforeEach(() => {
window.HTMLMediaElement.prototype.load = mockLoad
window.HTMLMediaElement.prototype.play = mockPlay
window.HTMLMediaElement.prototype.pause = mockPause
- window.matchMedia = jest
+ window.matchMedia = vi
.fn()
.mockImplementation(() => mockDoesNotPreferReducedMotion)
// this will stop throwing the unstable_flushDiscreteUpdates console error cause by react bug
// https://stackoverflow.com/a/65338472/18285270
Object.defineProperty(HTMLMediaElement.prototype, "muted", {
- set: jest.fn(),
+ set: vi.fn(),
})
})
afterEach(() => {
- jest.clearAllMocks()
+ vi.clearAllMocks()
})
- it("renders a video player in the document and autoplay", async () => {
+ it("renders a video player in the document and autoplay", () => {
render(
)
const videoPlayer = screen.getByTestId("kz-video-player")
@@ -55,92 +56,37 @@ describe(" ", () => {
expect(mockPlay).toHaveBeenCalled()
})
- describe("use-reduced-motion", () => {
- it("respects the use-reduced-motion preferences of the user", () => {
- window.matchMedia = jest
- .fn()
- .mockImplementation(() => mockPrefersReducedMotion)
- render(
-
- )
- const videoPlayer = screen.getByTestId("kz-video-player")
- expect(videoPlayer).not.toHaveAttribute("autoplay")
- expect(mockPause).toHaveBeenCalled()
- })
-
- it("defaults to autoplay when user does not set use-reduced-motion preferences", () => {
- window.matchMedia = jest
- .fn()
- .mockImplementation(() => mockDoesNotPreferReducedMotion)
- render(
-
- )
- const videoPlayer = screen.getByTestId("kz-video-player")
- expect(videoPlayer).toHaveAttribute("autoplay")
- expect(mockPlay).toHaveBeenCalled()
- })
- })
-
- describe("when the aspect ratio is set as a prop", () => {
- it("has aspect ratio class", () => {
- window.matchMedia = jest
- .fn()
- .mockImplementation(() => mockDoesNotPreferReducedMotion)
- const { container } = render(
-
- )
- expect(container.querySelector(".aspectRatioWrapper")).toBeTruthy()
- expect(container.querySelector(".landscape")).toBeTruthy()
- })
- })
-
- describe("when the aspect ratio is not set as a prop", () => {
- it("does not have aspect ratio class", () => {
- window.matchMedia = jest
- .fn()
- .mockImplementation(() => mockDoesNotPreferReducedMotion)
- const { container } = render(
-
- )
- expect(container.querySelector(".aspectRatioWrapper")).toBeFalsy()
- expect(container.querySelector(".landscape")).toBeFalsy()
- })
+ it("respects the use-reduced-motion preferences of the user", () => {
+ window.matchMedia = vi
+ .fn()
+ .mockImplementation(() => mockPrefersReducedMotion)
+ render(
+
+ )
+ const videoPlayer = screen.getByTestId("kz-video-player")
+ expect(videoPlayer).not.toHaveAttribute("autoplay")
+ expect(mockPause).toHaveBeenCalled()
})
- describe("Pausing/Playing animations", () => {
- it("restarts the animation when pause button is clicked", () => {
- const { container, getByRole } = render(
-
- )
-
- const videoElement = container.querySelector("video")!
-
- expect(videoElement.paused).toEqual(true)
-
- const button = getByRole("button")
- userEvent.click(button)
-
- expect(mockPlay).toHaveBeenCalled()
- })
+ it("defaults to autoplay when user does not set use-reduced-motion preferences", () => {
+ window.matchMedia = vi
+ .fn()
+ .mockImplementation(() => mockDoesNotPreferReducedMotion)
+ render(
+
+ )
+ const videoPlayer = screen.getByTestId("kz-video-player")
+ expect(videoPlayer).toHaveAttribute("autoplay")
+ expect(mockPlay).toHaveBeenCalled()
})
})
diff --git a/packages/components/src/Illustration/subcomponents/VideoPlayer/VideoPlayer.stickersheet.stories.tsx b/packages/components/src/Illustration/subcomponents/VideoPlayer/VideoPlayer.stickersheet.stories.tsx
new file mode 100644
index 00000000000..53edd4e622d
--- /dev/null
+++ b/packages/components/src/Illustration/subcomponents/VideoPlayer/VideoPlayer.stickersheet.stories.tsx
@@ -0,0 +1,68 @@
+import React from "react"
+import { Meta } from "@storybook/react"
+import {
+ StickerSheet,
+ StickerSheetStory,
+} from "~storybook/components/StickerSheet"
+import { VideoPlayer } from "./index"
+
+export default {
+ title: "Components/Illustrations/VideoPlayer",
+ parameters: {
+ controls: { disable: true },
+ chromatic: { disable: false },
+ },
+} satisfies Meta
+
+const StickerSheetTemplate: StickerSheetStory = {
+ render: ({ isReversed }) => (
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ ),
+}
+
+export const StickerSheetDefault: StickerSheetStory = {
+ ...StickerSheetTemplate,
+ name: "Sticker Sheet (Default)",
+}
diff --git a/packages/components/src/Illustration/subcomponents/VideoPlayer/VideoPlayer.stories.tsx b/packages/components/src/Illustration/subcomponents/VideoPlayer/VideoPlayer.stories.tsx
new file mode 100644
index 00000000000..0223f8e54a4
--- /dev/null
+++ b/packages/components/src/Illustration/subcomponents/VideoPlayer/VideoPlayer.stories.tsx
@@ -0,0 +1,37 @@
+import React from "react"
+import { Meta, StoryObj } from "@storybook/react"
+import { userEvent, within, expect, waitFor } from "@storybook/test"
+import { VideoPlayer } from "./index"
+
+const meta = {
+ title: "Components/Illustrations/VideoPlayer",
+ component: VideoPlayer,
+ args: {
+ autoplay: false,
+ fallback: "illustrations/heart/scene/brand-moments-positive-outro",
+ source: "illustrations/heart/scene/brand-moments-positive-outro",
+ },
+} satisfies Meta
+
+export default meta
+
+type Story = StoryObj
+
+export const PausePlay: Story = {
+ render: args => ,
+ name: "VideoPlayer: Pause/Play",
+ play: async ({ canvasElement }) => {
+ const canvas = within(canvasElement)
+ const element = canvas.getByRole("button")
+
+ waitFor(() => {
+ userEvent.click(element)
+ expect(element).toHaveAttribute("aria-label", "Pause animation")
+ })
+
+ waitFor(() => {
+ userEvent.click(element)
+ expect(element).toHaveAttribute("aria-label", "Play animation")
+ })
+ },
+}
diff --git a/packages/components/src/Illustration/utils/usePausePlay.spec.tsx b/packages/components/src/Illustration/utils/usePausePlay.spec.tsx
deleted file mode 100644
index 8bbba3a820f..00000000000
--- a/packages/components/src/Illustration/utils/usePausePlay.spec.tsx
+++ /dev/null
@@ -1,85 +0,0 @@
-import React, { RefObject, act } from "react"
-import { render, renderHook } from "@testing-library/react"
-import { LaunchIcon, PauseIcon } from "~components/Icon"
-import { usePausePlay, usePausePlayHook } from "./usePausePlay"
-
-describe("usePausePlay()", () => {
- beforeEach(() => {
- jest.clearAllMocks()
- })
-
- let hookResult: usePausePlayHook
- const mockPause = jest.fn()
- const mockPlay = jest.fn()
-
- describe("when toggling a currently playing video", () => {
- beforeEach(() => {
- const fakeRef = {
- current: {
- pause: mockPause,
- play: mockPlay,
- paused: false, // It's playing
- },
- } as unknown as RefObject
-
- const { result } = renderHook(() => usePausePlay(fakeRef))
-
- act(() => {
- result.current.toggle()
- })
-
- hookResult = result.current
- })
-
- it("pauses the video", () => {
- expect(mockPause).toHaveBeenCalled()
- })
-
- it("returns the play icon", () => {
- const { baseElement: original } = render(hookResult.icon)
- const { baseElement: comparison } = render(
-
- )
- expect(original).toEqual(comparison)
- })
-
- it("returns the 'Play animation' label", () => {
- expect(hookResult.label).toEqual("Play animation")
- })
- })
-
- describe("when toggling a currently paused video", () => {
- beforeEach(() => {
- const fakeRef = {
- current: {
- pause: mockPause,
- play: mockPlay,
- paused: true, // It's not playing
- },
- } as unknown as RefObject
-
- const { result } = renderHook(() => usePausePlay(fakeRef))
-
- act(() => {
- result.current.toggle()
- })
-
- hookResult = result.current
- })
- it("starts the video again", () => {
- expect(mockPlay).toHaveBeenCalled()
- })
-
- it("returns the pause icon", () => {
- const { baseElement: original } = render(hookResult.icon)
- const { baseElement: comparison } = render(
-
- )
- expect(original).toEqual(comparison)
- })
-
- it("returns the 'Pause animation' label", () => {
- expect(hookResult.label).toEqual("Pause animation")
- })
- })
-})
diff --git a/packages/components/src/Input/InputRange/InputRange.spec.tsx b/packages/components/src/Input/InputRange/InputRange.spec.tsx
index f01e9e08673..816e9ee99e7 100644
--- a/packages/components/src/Input/InputRange/InputRange.spec.tsx
+++ b/packages/components/src/Input/InputRange/InputRange.spec.tsx
@@ -1,10 +1,10 @@
import React from "react"
import { render, screen, fireEvent, waitFor } from "@testing-library/react"
+import { vi } from "vitest"
import { InputRange } from "./index"
-
describe(" ", () => {
it("fires onChange after interaction", async () => {
- const onChange = jest.fn()
+ const onChange = vi.fn()
render(
=> {
const mergedInputProps = { ...defaultInputProps, ...props }
- return renderWithIntl(
-
- )
+ return render( )
}
describe(" ", () => {
diff --git a/packages/components/src/KaizenProvider/KaizenProvider.spec.tsx b/packages/components/src/KaizenProvider/KaizenProvider.spec.tsx
index 9815d9ffc42..3bdb80c650b 100644
--- a/packages/components/src/KaizenProvider/KaizenProvider.spec.tsx
+++ b/packages/components/src/KaizenProvider/KaizenProvider.spec.tsx
@@ -1,7 +1,7 @@
import React from "react"
import { render } from "@testing-library/react"
+import { vi } from "vitest"
import { KaizenProvider, KaizenProviderProps } from "./KaizenProvider"
-
const KaizenProviderWrapper = ({
children,
...restProps
@@ -9,7 +9,7 @@ const KaizenProviderWrapper = ({
{children}
)
-jest.mock("./subcomponents/OptionalIntlProvider", () => ({
+vi.mock("./subcomponents/OptionalIntlProvider", () => ({
OptionalIntlProvider: ({ children }: { children: React.ReactElement }) => (
{children}
),
diff --git a/packages/components/src/KaizenProvider/subcomponents/OptionalIntlProvider/OptionalIntlProvider.spec.tsx b/packages/components/src/KaizenProvider/subcomponents/OptionalIntlProvider/OptionalIntlProvider.spec.tsx
index 9e0c26db21b..1ddaf7b88e4 100644
--- a/packages/components/src/KaizenProvider/subcomponents/OptionalIntlProvider/OptionalIntlProvider.spec.tsx
+++ b/packages/components/src/KaizenProvider/subcomponents/OptionalIntlProvider/OptionalIntlProvider.spec.tsx
@@ -1,9 +1,10 @@
import React from "react"
import { render, screen } from "@testing-library/react"
import { IntlProvider } from "react-intl"
+import { vi } from "vitest"
import { OptionalIntlProvider } from "."
-jest.mock("@cultureamp/i18n-react-intl", () => ({
+vi.mock("@cultureamp/i18n-react-intl", () => ({
StaticIntlProvider: ({ children }: { children: React.ReactElement }) => (
{children}
),
@@ -35,5 +36,3 @@ describe("", () => {
expect(childrenResult).toBeInTheDocument()
})
})
-
-/* eslint-enable jest/expect-expect */
diff --git a/packages/components/src/Modal/ConfirmationModal/ConfirmationModal.spec.tsx b/packages/components/src/Modal/ConfirmationModal/ConfirmationModal.spec.tsx
index 74e07a87ad3..13b655d6c8a 100644
--- a/packages/components/src/Modal/ConfirmationModal/ConfirmationModal.spec.tsx
+++ b/packages/components/src/Modal/ConfirmationModal/ConfirmationModal.spec.tsx
@@ -1,9 +1,9 @@
import React from "react"
import { render, waitFor } from "@testing-library/react"
import userEvent from "@testing-library/user-event"
+import { vi } from "vitest"
import { mockMatchMedia } from "~components/utils/useMediaQueries.spec"
import { ConfirmationModal, ConfirmationModalProps } from "./ConfirmationModal"
-
const user = userEvent.setup()
const ConfirmationModalWrapper = ({
@@ -28,8 +28,8 @@ describe(" ", () => {
})
it("supports a dismiss action when dismiss button is pressed", async () => {
- const handleConfirm = jest.fn()
- const handleDismiss = jest.fn()
+ const handleConfirm = vi.fn()
+ const handleDismiss = vi.fn()
const { getByLabelText } = render(
", () => {
})
it("supports a dismiss action when cancel button is pressed", async () => {
- const handleConfirm = jest.fn()
- const handleDismiss = jest.fn()
+ const handleConfirm = vi.fn()
+ const handleDismiss = vi.fn()
const { getByText } = render(
", () => {
})
it("supports a confirm action when confirm button is pressed", async () => {
- const handleConfirm = jest.fn()
- const handleDismiss = jest.fn()
+ const handleConfirm = vi.fn()
+ const handleDismiss = vi.fn()
const { getByText } = render(
", () => {
})
it("supports a dismiss action when dismiss button is pressed", async () => {
- const handleConfirm = jest.fn()
- const handleDismiss = jest.fn()
+ const handleConfirm = vi.fn()
+ const handleDismiss = vi.fn()
const { getByLabelText } = render(
Example modal body
@@ -44,8 +44,8 @@ describe(" ", () => {
})
it("supports a confirm action when confirm button is pressed", async () => {
- const handleConfirm = jest.fn()
- const handleDismiss = jest.fn()
+ const handleConfirm = vi.fn()
+ const handleDismiss = vi.fn()
const { getByText } = render(
Example modal body
diff --git a/packages/components/src/Modal/GenericModal/GenericModal.spec.tsx b/packages/components/src/Modal/GenericModal/GenericModal.spec.tsx
index 0b262a5bb6b..9b5e3d89775 100644
--- a/packages/components/src/Modal/GenericModal/GenericModal.spec.tsx
+++ b/packages/components/src/Modal/GenericModal/GenericModal.spec.tsx
@@ -1,11 +1,11 @@
import React from "react"
import { render, screen, waitFor } from "@testing-library/react"
import userEvent from "@testing-library/user-event"
+import { vi } from "vitest"
import { GenericModal, GenericModalProps } from "./GenericModal"
import { ModalAccessibleLabel } from "./subcomponents/ModalAccessibleLabel"
import { ModalBody } from "./subcomponents/ModalBody"
import { ModalHeader } from "./subcomponents/ModalHeader"
-
const user = userEvent.setup()
const GenericModalWrapper = ({
@@ -50,7 +50,7 @@ describe(" ", () => {
})
it("closes the modal when escape key is pressed", async () => {
- const handleDismiss = jest.fn()
+ const handleDismiss = vi.fn()
render( )
@@ -70,7 +70,7 @@ describe(" ", () => {
})
it("closes the modal when a click is outside of the modal content", async () => {
- const handleDismiss = jest.fn()
+ const handleDismiss = vi.fn()
render( )
await user.click(screen.getByTestId("GenericModalTestId-scrollLayer"))
@@ -80,7 +80,7 @@ describe(" ", () => {
})
it("calls onAfterLeave after it closes", async () => {
- const mockOnAfterLeave = jest.fn()
+ const mockOnAfterLeave = vi.fn()
render( )
await user.click(screen.getByTestId("GenericModalTestId-scrollLayer"))
diff --git a/packages/components/src/Modal/InputEditModal/InputEditModal.spec.tsx b/packages/components/src/Modal/InputEditModal/InputEditModal.spec.tsx
index 0841590f834..83e212b1ef6 100644
--- a/packages/components/src/Modal/InputEditModal/InputEditModal.spec.tsx
+++ b/packages/components/src/Modal/InputEditModal/InputEditModal.spec.tsx
@@ -1,9 +1,9 @@
import React from "react"
import { render, waitFor } from "@testing-library/react"
import userEvent from "@testing-library/user-event"
+import { vi } from "vitest"
import { mockMatchMedia } from "~components/utils/useMediaQueries.spec"
import { InputEditModal, InputEditModalProps } from "./InputEditModal"
-
const user = userEvent.setup()
const InputEditModalWrapper = ({
@@ -28,8 +28,8 @@ describe(" ", () => {
})
it("supports a dismiss action when dismiss button is pressed", async () => {
- const handleSubmit = jest.fn()
- const handleDismiss = jest.fn()
+ const handleSubmit = vi.fn()
+ const handleDismiss = vi.fn()
const { getByLabelText } = render(
Example modal body
@@ -43,8 +43,8 @@ describe(" ", () => {
})
it("supports a dismiss action when cancel button is pressed", async () => {
- const handleSubmit = jest.fn()
- const handleDismiss = jest.fn()
+ const handleSubmit = vi.fn()
+ const handleDismiss = vi.fn()
const { getByText } = render(
Example modal body
@@ -58,8 +58,8 @@ describe(" ", () => {
})
it("supports a Submit action when Submit button is pressed", async () => {
- const handleSubmit = jest.fn()
- const handleDismiss = jest.fn()
+ const handleSubmit = vi.fn()
+ const handleDismiss = vi.fn()
const { getByText } = render(
Example modal body
diff --git a/packages/components/src/MultiSelect/subcomponents/MultiSelectOptionField/MultiSelectOptionField.spec.tsx b/packages/components/src/MultiSelect/subcomponents/MultiSelectOptionField/MultiSelectOptionField.spec.tsx
index 8e0417782af..4f68ff88c20 100644
--- a/packages/components/src/MultiSelect/subcomponents/MultiSelectOptionField/MultiSelectOptionField.spec.tsx
+++ b/packages/components/src/MultiSelect/subcomponents/MultiSelectOptionField/MultiSelectOptionField.spec.tsx
@@ -1,15 +1,15 @@
import React, { useState } from "react"
import { render, waitFor } from "@testing-library/react"
import userEvent from "@testing-library/user-event"
+import { vi } from "vitest"
import { CheckboxProps } from "../Checkbox"
import {
MultiSelectOptionField,
MultiSelectOptionFieldProps,
} from "./MultiSelectOptionField"
-
const user = userEvent.setup()
-const onChange = jest.fn()
+const onChange = vi.fn()
const MultiSelectOptionFieldWrapper = (
customProps?: Partial
@@ -42,7 +42,7 @@ const MultiSelectOptionFieldWrapper = (
describe(" ", () => {
afterEach(() => {
- jest.clearAllMocks()
+ vi.clearAllMocks()
})
it("has an accessible name", () => {
diff --git a/packages/components/src/MultiSelect/subcomponents/MultiSelectOptions/MultiSelectOptions.spec.tsx b/packages/components/src/MultiSelect/subcomponents/MultiSelectOptions/MultiSelectOptions.spec.tsx
index ba6b352a7fd..8f4a722fb14 100644
--- a/packages/components/src/MultiSelect/subcomponents/MultiSelectOptions/MultiSelectOptions.spec.tsx
+++ b/packages/components/src/MultiSelect/subcomponents/MultiSelectOptions/MultiSelectOptions.spec.tsx
@@ -1,14 +1,14 @@
import React, { useState } from "react"
import { render, waitFor } from "@testing-library/react"
import userEvent from "@testing-library/user-event"
+import { vi } from "vitest"
import {
MultiSelectOptions,
MultiSelectOptionsProps,
} from "./MultiSelectOptions"
-
const user = userEvent.setup()
-const onChange = jest.fn()
+const onChange = vi.fn()
const testOptions = [
{
label: "Pancakes",
@@ -46,7 +46,7 @@ const MultiSelectOptionsWrapper = (
describe(" ", () => {
afterEach(() => {
- jest.clearAllMocks()
+ vi.clearAllMocks()
})
it("contains the number of options available in the accessible description", () => {
diff --git a/packages/components/src/MultiSelect/subcomponents/MultiSelectToggle/MultiSelectToggle.spec.tsx b/packages/components/src/MultiSelect/subcomponents/MultiSelectToggle/MultiSelectToggle.spec.tsx
index ba4b29822bd..d9646ad68a1 100644
--- a/packages/components/src/MultiSelect/subcomponents/MultiSelectToggle/MultiSelectToggle.spec.tsx
+++ b/packages/components/src/MultiSelect/subcomponents/MultiSelectToggle/MultiSelectToggle.spec.tsx
@@ -1,11 +1,11 @@
import React from "react"
import { render, waitFor } from "@testing-library/react"
import userEvent from "@testing-library/user-event"
+import { vi } from "vitest"
import { MultiSelectToggle, MultiSelectToggleProps } from "./MultiSelectToggle"
-
const user = userEvent.setup()
-const onClick = jest.fn()
+const onClick = vi.fn()
const MultiSelectToggleWrapper = (
customProps?: Partial
diff --git a/packages/components/src/Notification/subcomponents/GenericNotification/GenericNotification.spec.tsx b/packages/components/src/Notification/subcomponents/GenericNotification/GenericNotification.spec.tsx
deleted file mode 100644
index 57703ef581c..00000000000
--- a/packages/components/src/Notification/subcomponents/GenericNotification/GenericNotification.spec.tsx
+++ /dev/null
@@ -1,76 +0,0 @@
-import React, { act } from "react"
-import { fireEvent, waitFor } from "@testing-library/dom"
-import { render } from "@testing-library/react"
-import ReactTestUtils from "react-dom/test-utils"
-import { GenericNotification } from "./GenericNotification"
-
-describe(" ", () => {
- afterEach(() => {
- jest.runAllTimers()
- })
-
- beforeEach(() => {
- jest.useFakeTimers()
- })
-
- it('begins "hidden" but transitions out of it immediately', async () => {
- const { container } = render(
-
- This is my positive notification
-
- )
-
- await waitFor(() => {
- expect(container.querySelector(".hidden")).toBeInTheDocument()
- })
-
- await act(async () => {
- jest.advanceTimersByTime(50)
- })
-
- await waitFor(() => {
- expect(container.querySelector(".hidden")).not.toBeInTheDocument()
- })
- })
-
- it("hides the notification and triggers the onHide callback when the cancel button is clicked", async () => {
- const onHide = jest.fn()
- const { container, getByTestId } = render(
-
- Notification Text
-
- )
-
- // The element should start in a "hidden" state
- expect(container.querySelector(".hidden")).toBeTruthy()
-
- // After clicking, the element should fade out, but the onHide not trigger yet.
- const cancelButton = getByTestId("close-button")
- const notification = container.querySelector(".notification")
-
- fireEvent(cancelButton, new MouseEvent("click"))
-
- await waitFor(() => {
- expect(notification).toBeTruthy()
- })
-
- // Cannot use @testing-library/react `fireEvent` as it relies on jsdom events
- // TransitionEvent has not been implemented yet, using `ReactTestUtils.Simulate` is a workaround
- act(() => {
- notification &&
- ReactTestUtils.Simulate.transitionEnd(notification, {
- propertyName: "margin-top",
- } as any)
- })
-
- await waitFor(() => {
- expect(notification).not.toBeInTheDocument()
- })
- await waitFor(() => expect(onHide).toHaveBeenCalledTimes(1))
- })
-})
diff --git a/packages/components/src/Notification/subcomponents/GenericNotification/GenericNotification.stories.tsx b/packages/components/src/Notification/subcomponents/GenericNotification/GenericNotification.stories.tsx
new file mode 100644
index 00000000000..5bdb2b66eb6
--- /dev/null
+++ b/packages/components/src/Notification/subcomponents/GenericNotification/GenericNotification.stories.tsx
@@ -0,0 +1,60 @@
+import React, { useState } from "react"
+import { Meta, StoryObj } from "@storybook/react"
+import { userEvent, within, expect, waitFor } from "@storybook/test"
+import { GenericNotification } from "./index"
+
+const meta = {
+ title: "Components/Notifications/GenericNotification",
+ component: GenericNotification,
+ args: {
+ variant: "success",
+ style: "inline",
+ title: "Success",
+ children: "This is my positive notification",
+ },
+} satisfies Meta
+
+export default meta
+
+type Story = StoryObj
+
+export const GenericNotificationTest: Story = {
+ render: () => {
+ const [isHidden, setIsHidden] = useState(false)
+
+ return (
+
+ {isHidden ? "Hidden" : "Shown"}
+ setIsHidden(true)}
+ >
+ This is my positive notification
+
+
+ )
+ },
+ name: "Test: Closes when close button is clicked and onHide is called",
+ play: async ({ canvasElement }) => {
+ const canvas = within(canvasElement)
+ const element = canvas.getByTestId("generic-notification")
+ const hiddenState = canvas.getByTestId("hidden-state")
+
+ await waitFor(() => {
+ expect(element).toBeInTheDocument()
+ expect(hiddenState).toHaveTextContent("Shown")
+ })
+
+ await userEvent.click(canvas.getByTestId("close-button"))
+
+ await waitFor(() => {
+ setTimeout(() => {
+ expect(hiddenState).toHaveTextContent("Hidden")
+ expect(element).not.toBeInTheDocument()
+ }, 1000)
+ })
+ },
+}
diff --git a/packages/components/src/Pagination/Pagination.spec.tsx b/packages/components/src/Pagination/Pagination.spec.tsx
index e7a852d632c..15f7066a7d7 100644
--- a/packages/components/src/Pagination/Pagination.spec.tsx
+++ b/packages/components/src/Pagination/Pagination.spec.tsx
@@ -11,12 +11,12 @@ const defaultProps = {
ariaLabelNextPage: "Next page",
ariaLabelPreviousPage: "Previous page",
ariaLabelPage: "Page",
- onPageChange: jest.fn(),
+ onPageChange: vi.fn(),
}
describe(" ", () => {
it("calls onPageChange when clicking page number", async () => {
- const onPageChange = jest.fn()
+ const onPageChange = vi.fn()
render( )
diff --git a/packages/components/src/RichTextEditor/EditableRichTextContent/EditableRichTextContent.spec.tsx b/packages/components/src/RichTextEditor/EditableRichTextContent/EditableRichTextContent.spec.tsx
index 8ea8a38c56b..b712eb60414 100644
--- a/packages/components/src/RichTextEditor/EditableRichTextContent/EditableRichTextContent.spec.tsx
+++ b/packages/components/src/RichTextEditor/EditableRichTextContent/EditableRichTextContent.spec.tsx
@@ -1,11 +1,11 @@
import React from "react"
import { render } from "@testing-library/react"
+import { vi } from "vitest"
import { RichTextContentProps } from "../RichTextContent"
import { EditableRichTextContent } from "./EditableRichTextContent"
+const mockFn = vi.fn()
-const mockFn = jest.fn()
-
-jest.mock("../RichTextContent", () => ({
+vi.mock("../RichTextContent", () => ({
__esModule: true,
RichTextContent: (props: RichTextContentProps): JSX.Element => {
mockFn(props)
@@ -26,7 +26,7 @@ describe("Content props are passed", () => {
)
diff --git a/packages/components/src/RichTextEditor/utils/commands/addMark.spec.ts b/packages/components/src/RichTextEditor/utils/commands/addMark.spec.ts
index 80460388b7d..13838e18542 100644
--- a/packages/components/src/RichTextEditor/utils/commands/addMark.spec.ts
+++ b/packages/components/src/RichTextEditor/utils/commands/addMark.spec.ts
@@ -1,4 +1,5 @@
import { findByText, waitFor } from "@testing-library/dom"
+import { vi } from "vitest"
import { createRichTextEditor } from "../core"
import { addMark } from "./addMark"
import {
@@ -7,9 +8,8 @@ import {
simulateTextInsert,
} from "./fixtures/helpers"
import { testEditorState, testSchema } from "./fixtures/test-state"
-
describe("addMark()", () => {
- const onChange = jest.fn()
+ const onChange = vi.fn()
const attributes = { "aria-labelledby": "label-text-123" }
it("creates an empty wrapper of the given Mark type if no selection is provided", async () => {
diff --git a/packages/components/src/RichTextEditor/utils/commands/fixtures/helpers.ts b/packages/components/src/RichTextEditor/utils/commands/fixtures/helpers.ts
index 34c66c7283e..1fb240d0fd8 100644
--- a/packages/components/src/RichTextEditor/utils/commands/fixtures/helpers.ts
+++ b/packages/components/src/RichTextEditor/utils/commands/fixtures/helpers.ts
@@ -5,14 +5,15 @@ import {
Transaction,
} from "prosemirror-state"
import { findChildrenByType } from "prosemirror-utils"
+// eslint-disable-next-line import/no-extraneous-dependencies
+import { vi } from "vitest"
import { ProseMirrorModel } from "../../prosemirror"
-
/*
** This is used handle the JSDom type error issue you may encounter in testing
** See https://github.com/jsdom/jsdom/issues/3002
*/
export const mockRangeForBoundingRect = (): void => {
- jest.spyOn(document, "createRange").mockImplementation(() => {
+ vi.spyOn(document, "createRange").mockImplementation(() => {
const range = new Range()
range.getBoundingClientRect = () => ({
@@ -30,7 +31,7 @@ export const mockRangeForBoundingRect = (): void => {
range.getClientRects = () => ({
item: () => null,
length: 0,
- [Symbol.iterator]: jest.fn(),
+ [Symbol.iterator]: vi.fn(),
})
return range
diff --git a/packages/components/src/RichTextEditor/utils/commands/getMarkAttrs.spec.ts b/packages/components/src/RichTextEditor/utils/commands/getMarkAttrs.spec.ts
index 711e439c6af..1bad58a73a2 100644
--- a/packages/components/src/RichTextEditor/utils/commands/getMarkAttrs.spec.ts
+++ b/packages/components/src/RichTextEditor/utils/commands/getMarkAttrs.spec.ts
@@ -1,12 +1,12 @@
import { waitFor } from "@testing-library/dom"
import { EditorState } from "prosemirror-state"
+import { vi } from "vitest"
import { createRichTextEditor } from "../core"
import { simulateSelectionByText } from "./fixtures/helpers"
import { testEditorStateWithMarks, testSchema } from "./fixtures/test-state"
import { getMarkAttrs } from "./getMarkAttrs"
-
describe("getMarkAttrs()", () => {
- const onChange = jest.fn()
+ const onChange = vi.fn()
const attributes = { "aria-labelledby": "label-text-123" }
it("returns an empty object if the selected Mark has no attributes", async () => {
diff --git a/packages/components/src/RichTextEditor/utils/commands/getMarkRange.spec.ts b/packages/components/src/RichTextEditor/utils/commands/getMarkRange.spec.ts
index df3b137502f..8f346d7b530 100644
--- a/packages/components/src/RichTextEditor/utils/commands/getMarkRange.spec.ts
+++ b/packages/components/src/RichTextEditor/utils/commands/getMarkRange.spec.ts
@@ -1,12 +1,12 @@
import { waitFor } from "@testing-library/dom"
import { EditorState } from "prosemirror-state"
+import { vi } from "vitest"
import { createRichTextEditor } from "../core"
import { simulateSelectionByText } from "./fixtures/helpers"
import { testEditorStateWithMarks } from "./fixtures/test-state"
import { getMarkRange } from "./getMarkRange"
-
describe("getMarkRange()", () => {
- const onChange = jest.fn()
+ const onChange = vi.fn()
const attributes = { "aria-labelledby": "label-text-123" }
it("returns the entire range of the Mark provided from a resolved position", async () => {
diff --git a/packages/components/src/RichTextEditor/utils/commands/listIsActive.spec.ts b/packages/components/src/RichTextEditor/utils/commands/listIsActive.spec.ts
index 019bd5be33e..d53f776164a 100644
--- a/packages/components/src/RichTextEditor/utils/commands/listIsActive.spec.ts
+++ b/packages/components/src/RichTextEditor/utils/commands/listIsActive.spec.ts
@@ -1,12 +1,12 @@
import { waitFor } from "@testing-library/dom"
import { EditorState } from "prosemirror-state"
+import { vi } from "vitest"
import { createRichTextEditor } from "../core"
import { simulateSelectionByText } from "./fixtures/helpers"
import { testEditorStateWitList, testSchema } from "./fixtures/test-state"
import { listIsActive } from "./listIsActive"
-
describe("listIsActive()", () => {
- const onChange = jest.fn()
+ const onChange = vi.fn()
const attributes = { "aria-labelledby": "label-text-123" }
const listNodes = [testSchema.nodes.bulletList, testSchema.nodes.orderedList]
diff --git a/packages/components/src/RichTextEditor/utils/commands/markContainsSelection.spec.ts b/packages/components/src/RichTextEditor/utils/commands/markContainsSelection.spec.ts
index a69e941eb08..e42894c5a5c 100644
--- a/packages/components/src/RichTextEditor/utils/commands/markContainsSelection.spec.ts
+++ b/packages/components/src/RichTextEditor/utils/commands/markContainsSelection.spec.ts
@@ -1,12 +1,12 @@
import { waitFor } from "@testing-library/dom"
import { EditorState } from "prosemirror-state"
+import { vi } from "vitest"
import { createRichTextEditor } from "../core"
import { simulateSelectionByText } from "./fixtures/helpers"
import { testEditorStateWithMarks, testSchema } from "./fixtures/test-state"
import { markContainsSelection } from "./markContainsSelection"
-
describe("markContainsSelection()", () => {
- const onChange = jest.fn()
+ const onChange = vi.fn()
const attributes = { "aria-labelledby": "label-text-123" }
it("will return true if the current select contains the provided Mark", async () => {
diff --git a/packages/components/src/RichTextEditor/utils/commands/markIsActive.spec.ts b/packages/components/src/RichTextEditor/utils/commands/markIsActive.spec.ts
index f288e4bdc79..601ccdf9b2f 100644
--- a/packages/components/src/RichTextEditor/utils/commands/markIsActive.spec.ts
+++ b/packages/components/src/RichTextEditor/utils/commands/markIsActive.spec.ts
@@ -1,5 +1,6 @@
import { waitFor } from "@testing-library/dom"
import { EditorState } from "prosemirror-state"
+import { vi } from "vitest"
import { createRichTextEditor } from "../core"
import {
simulateRangeSelection,
@@ -7,9 +8,8 @@ import {
} from "./fixtures/helpers"
import { testEditorStateWithMarks, testSchema } from "./fixtures/test-state"
import { markIsActive } from "./markIsActive"
-
describe("markIsActive()", () => {
- const onChange = jest.fn()
+ const onChange = vi.fn()
const attributes = { "aria-labelledby": "label-text-123" }
it("returns true if the provided Mark Type matches the current selection", async () => {
diff --git a/packages/components/src/RichTextEditor/utils/commands/removeMark.spec.ts b/packages/components/src/RichTextEditor/utils/commands/removeMark.spec.ts
index dbf5bae61f0..eb4b2eae51a 100644
--- a/packages/components/src/RichTextEditor/utils/commands/removeMark.spec.ts
+++ b/packages/components/src/RichTextEditor/utils/commands/removeMark.spec.ts
@@ -1,11 +1,11 @@
import { findByText, getByText, waitFor } from "@testing-library/dom"
+import { vi } from "vitest"
import { createRichTextEditor } from "../core"
import { simulateSelectionByText } from "./fixtures/helpers"
import { testEditorStateWithMarks, testSchema } from "./fixtures/test-state"
import { removeMark } from "./removeMark"
-
describe("removeMark()", () => {
- const onChange = jest.fn()
+ const onChange = vi.fn()
const attributes = { "aria-labelledby": "label-text-123" }
it("removes the given Mark from a paragraph in the document", async () => {
diff --git a/packages/components/src/RichTextEditor/utils/commands/updateMark.spec.ts b/packages/components/src/RichTextEditor/utils/commands/updateMark.spec.ts
index 1b61d870f6a..f1b07d67901 100644
--- a/packages/components/src/RichTextEditor/utils/commands/updateMark.spec.ts
+++ b/packages/components/src/RichTextEditor/utils/commands/updateMark.spec.ts
@@ -1,11 +1,11 @@
import { getByRole, getByText, waitFor } from "@testing-library/dom"
+import { vi } from "vitest"
import { createRichTextEditor } from "../core"
import { simulateSelectionByText } from "./fixtures/helpers"
import { testEditorStateWithMarks, testSchema } from "./fixtures/test-state"
import { updateMark } from "./updateMark"
-
describe("updateMark()", () => {
- const onChange = jest.fn()
+ const onChange = vi.fn()
const attributes = { "aria-labelledby": "label-text-123" }
it("can update existing Mark with a nested Mark", async () => {
diff --git a/packages/components/src/RichTextEditor/utils/commands/validateAndRemoveMarks.spec.ts b/packages/components/src/RichTextEditor/utils/commands/validateAndRemoveMarks.spec.ts
index 50884f4e458..761df687e64 100644
--- a/packages/components/src/RichTextEditor/utils/commands/validateAndRemoveMarks.spec.ts
+++ b/packages/components/src/RichTextEditor/utils/commands/validateAndRemoveMarks.spec.ts
@@ -1,10 +1,10 @@
import { findByText, waitFor } from "@testing-library/dom"
+import { vi } from "vitest"
import { createRichTextEditor } from "../core"
import { testEditorStateWithMarks, testSchema } from "./fixtures/test-state"
import { validateAndRemoveMarks } from "./validateAndRemoveMarks"
-
describe("validateAndRemoveMarks()", () => {
- const onChange = jest.fn()
+ const onChange = vi.fn()
const attributes = { "aria-labelledby": "label-text-123" }
it("removes all Marks of the given type that fail the validator method", async () => {
@@ -16,7 +16,7 @@ describe("validateAndRemoveMarks()", () => {
initialEditorState: testEditorStateWithMarks,
})
// The current mockData will always return true so using the mock to represent bad attributes
- const failingValidatorMethod = jest.fn().mockImplementation(() => false)
+ const failingValidatorMethod = vi.fn().mockImplementation(() => false)
expect(node.querySelectorAll("a").length).toBeGreaterThan(0)
diff --git a/packages/components/src/RichTextEditor/utils/core/createRichTextEditor.spec.ts b/packages/components/src/RichTextEditor/utils/core/createRichTextEditor.spec.ts
index 5bb5190751d..bae876e0bc3 100644
--- a/packages/components/src/RichTextEditor/utils/core/createRichTextEditor.spec.ts
+++ b/packages/components/src/RichTextEditor/utils/core/createRichTextEditor.spec.ts
@@ -1,14 +1,14 @@
import { findByText, queryByText, getByText } from "@testing-library/dom"
import { Command, EditorState } from "prosemirror-state"
+import { vi } from "vitest"
import { createRichTextEditor } from "./createRichTextEditor"
import { testEditorState } from "./fixtures/testState"
-
describe("createRichTextEditor()", () => {
const attributes = { "aria-labelledby": "label-text-123" }
it("initializes an editor with the correct content", async () => {
const node = document.createElement("div")
- const onChange = jest.fn()
+ const onChange = vi.fn()
createRichTextEditor({
node,
@@ -23,7 +23,7 @@ describe("createRichTextEditor()", () => {
it("returns the expected API shape", async () => {
const node = document.createElement("div")
- const onChange = jest.fn()
+ const onChange = vi.fn()
const returnValue = createRichTextEditor({
node,
@@ -39,7 +39,7 @@ describe("createRichTextEditor()", () => {
it("destroys the instance", async () => {
const node = document.createElement("div")
- const onChange = jest.fn()
+ const onChange = vi.fn()
const { destroy } = createRichTextEditor({
node,
@@ -58,7 +58,7 @@ describe("createRichTextEditor()", () => {
it("updates the DOM when commands are dispatched", async () => {
const node = document.createElement("div")
- const onChange = jest.fn()
+ const onChange = vi.fn()
const command: Command = (state, dispatch) => {
// Insert text at the current selection point, which is the start because
@@ -87,7 +87,7 @@ describe("createRichTextEditor()", () => {
it("calls onChange when the editor state changes", async () => {
const node = document.createElement("div")
- const onChange = jest.fn()
+ const onChange = vi.fn()
const command: Command = (state, dispatch) => {
if (!dispatch) return false
dispatch(state.tr.insertText("Prepended content. "))
@@ -110,7 +110,7 @@ describe("createRichTextEditor()", () => {
it("calls onChange with the updated state", async () => {
const node = document.createElement("div")
- const onChange = jest.fn()
+ const onChange = vi.fn()
const command: Command = (state, dispatch) => {
if (!dispatch) return false
dispatch(state.tr.insertText("Prepended content. "))
@@ -155,7 +155,7 @@ describe("createRichTextEditor()", () => {
it("defaults to editable", async () => {
const node = document.createElement("div")
- const onChange = jest.fn()
+ const onChange = vi.fn()
createRichTextEditor({
node,
@@ -169,7 +169,7 @@ describe("createRichTextEditor()", () => {
it("respects initial isEditable value", async () => {
const node = document.createElement("div")
- const onChange = jest.fn()
+ const onChange = vi.fn()
createRichTextEditor({
node,
@@ -185,7 +185,7 @@ describe("createRichTextEditor()", () => {
it("updates editable status", async () => {
let editable = true
const node = document.createElement("div")
- const onChange = jest.fn()
+ const onChange = vi.fn()
const noopCommand: Command = (state, dispatch) => {
if (!dispatch) return false
dispatch(state.tr)
@@ -211,7 +211,7 @@ describe("createRichTextEditor()", () => {
it("aria-labelledby is present", async () => {
const editable = true
const node = document.createElement("div")
- const onChange = jest.fn()
+ const onChange = vi.fn()
const noopCommand: Command = (state, dispatch) => {
if (!dispatch) return false
dispatch(state.tr)
diff --git a/packages/components/src/RichTextEditor/utils/core/hooks/useRichTextEditor.spec.tsx b/packages/components/src/RichTextEditor/utils/core/hooks/useRichTextEditor.spec.tsx
index 003a7e60d88..13c400c9034 100644
--- a/packages/components/src/RichTextEditor/utils/core/hooks/useRichTextEditor.spec.tsx
+++ b/packages/components/src/RichTextEditor/utils/core/hooks/useRichTextEditor.spec.tsx
@@ -2,9 +2,9 @@ import React, { useEffect } from "react"
import { render, screen, waitFor } from "@testing-library/react"
import userEvent from "@testing-library/user-event"
import { Command, EditorState } from "prosemirror-state"
+import { vi } from "vitest"
import { testEditorState } from "../fixtures/testState"
import { useRichTextEditor } from "./useRichTextEditor"
-
const user = userEvent.setup()
const Scenario = ({
@@ -76,7 +76,7 @@ describe("useRichTextEditor()", () => {
})
it("updates the editorState when commands are dispatched", async () => {
- const onChange = jest.fn()
+ const onChange = vi.fn()
render( )
await waitFor(() => {
diff --git a/packages/components/src/SplitButton/SplitButton.spec.tsx b/packages/components/src/SplitButton/SplitButton.spec.tsx
index c6b28711c04..e5b1c132f78 100644
--- a/packages/components/src/SplitButton/SplitButton.spec.tsx
+++ b/packages/components/src/SplitButton/SplitButton.spec.tsx
@@ -1,7 +1,7 @@
import React from "react"
-import { screen, waitFor } from "@testing-library/react"
+import { screen, waitFor, render } from "@testing-library/react"
import userEvent from "@testing-library/user-event"
-import { renderWithIntl } from "~tests"
+import { vi } from "vitest"
import { MenuItem, MenuList } from "~components/__actions__/v2"
import { SplitButton, SplitButtonProps } from "./SplitButton"
@@ -13,7 +13,7 @@ const SplitButtonWrapper = (
", () => {
it("renders the correct structure", async () => {
- renderWithIntl( )
+ render( )
await waitFor(() => {
expect(screen.getByText("Action Text")).toBeInTheDocument()
})
@@ -46,7 +46,7 @@ describe(" ", () => {
})
it("disables both buttons when disabled is true", async () => {
- renderWithIntl( )
+ render( )
await waitFor(() => {
expect(screen.getByText("Action Text").closest("button")).toBeDisabled()
})
diff --git a/packages/components/src/SplitButton/subcomponents/DropdownButton/DropdownButton.spec.tsx b/packages/components/src/SplitButton/subcomponents/DropdownButton/DropdownButton.spec.tsx
index 5de2b9cc6b4..7f8df96e2f9 100644
--- a/packages/components/src/SplitButton/subcomponents/DropdownButton/DropdownButton.spec.tsx
+++ b/packages/components/src/SplitButton/subcomponents/DropdownButton/DropdownButton.spec.tsx
@@ -1,6 +1,5 @@
import React from "react"
-import { screen, waitFor } from "@testing-library/react"
-import { renderWithIntl } from "~tests"
+import { screen, waitFor, render } from "@testing-library/react"
import { DropdownButton, DropdownButtonProps } from "./DropdownButton"
const DropdownButtonWrapper = (
@@ -9,7 +8,7 @@ const DropdownButtonWrapper = (
describe(" ", () => {
it("renders icon with default aria-label", async () => {
- renderWithIntl( )
+ render( )
await waitFor(() => {
const button = screen.getByRole("button", { name: "Additional actions" })
expect(button.getAttribute("aria-label")).toBe("Additional actions")
@@ -18,7 +17,7 @@ describe(" ", () => {
})
it("renders custom aria-label", async () => {
- renderWithIntl( )
+ render( )
await waitFor(() => {
const button = screen.getByRole("button", { name: "Custom aria label" })
expect(button.getAttribute("aria-label")).toBe("Custom aria label")
diff --git a/packages/components/src/Text/Text.spec.tsx b/packages/components/src/Text/Text.spec.tsx
index e981d12bc8c..bcdf770698f 100644
--- a/packages/components/src/Text/Text.spec.tsx
+++ b/packages/components/src/Text/Text.spec.tsx
@@ -1,30 +1,8 @@
import * as React from "react"
import { render } from "@testing-library/react"
-import { AllowedTextColors, AllowedTextTags, Text, TextVariants } from "./"
+import { AllowedTextTags, Text, TextVariants } from "."
describe(" ", () => {
- describe("renders the correct variant classes", () => {
- const testCases: TextVariants[] = [
- "intro-lede",
- "body",
- "small",
- "extra-small",
- ]
-
- testCases.forEach(variant => {
- it(`renders the correct element for `, () => {
- const textMock = render(
-
- Example
-
- )
- const textClasslist = textMock.getByText("Example").classList
- expect(textClasslist).toContain("text")
- expect(textClasslist).toContain(variant)
- })
- })
- })
-
describe("changes rendered HTML element when passed tag", () => {
const testCases: TextVariants[] = [
"intro-lede",
@@ -45,30 +23,6 @@ describe(" ", () => {
})
})
- describe("renders the correct color classes", () => {
- const testCases: AllowedTextColors[] = [
- "dark",
- "dark-reduced-opacity",
- "white",
- "white-reduced-opacity",
- "positive",
- "negative",
- ]
-
- testCases.forEach(color => {
- it(`renders the correct class for `, () => {
- const textMock = render(
-
- Example
-
- )
- const textClasslist = textMock.getByText("Example").classList
- expect(textClasslist).toContain("text")
- expect(textClasslist).toContain(color)
- })
- })
- })
-
it("passes through data attributes", () => {
const { getByTestId } = render(
@@ -91,17 +45,7 @@ describe(" ", () => {
it(`renders the correct element for `, () => {
const textMock = render(Example )
expect(textMock.getByText("Example").tagName.toLowerCase()).toBe(el)
- expect(textMock.baseElement).toMatchSnapshot()
})
})
})
-
- it("allows consumers to provide a className", () => {
- const { getByText } = render(
-
- Example
-
- )
- expect(getByText("Example").classList).toContain("example-classname")
- })
})
diff --git a/packages/components/src/Text/__snapshots__/Text.spec.tsx.snap b/packages/components/src/Text/__snapshots__/Text.spec.tsx.snap
deleted file mode 100644
index 40fe97b1d1e..00000000000
--- a/packages/components/src/Text/__snapshots__/Text.spec.tsx.snap
+++ /dev/null
@@ -1,49 +0,0 @@
-// Jest Snapshot v1, https://goo.gl/fbAQLP
-
-exports[` defaults to the correct HTML element renders the correct element for 1`] = `
-
-
-
-`;
-
-exports[` defaults to the correct HTML element renders the correct element for 1`] = `
-
-
-
-
-
-`;
-
-exports[` defaults to the correct HTML element renders the correct element for 1`] = `
-
-
-
-`;
-
-exports[` defaults to the correct HTML element renders the correct element for 1`] = `
-
-
-
-`;
diff --git a/packages/components/src/TextArea/TextArea.spec.tsx b/packages/components/src/TextArea/TextArea.spec.tsx
index 17a64878c39..336c246c1d8 100644
--- a/packages/components/src/TextArea/TextArea.spec.tsx
+++ b/packages/components/src/TextArea/TextArea.spec.tsx
@@ -1,8 +1,8 @@
import React from "react"
import { render, waitFor } from "@testing-library/react"
import userEvent from "@testing-library/user-event"
+import { vi } from "vitest"
import { TextArea } from "./TextArea"
-
const user = userEvent.setup()
describe("", () => {
@@ -22,7 +22,7 @@ describe("", () => {
})
it("calls the `onChange` event when the value is updated", async () => {
- const mockFn = jest.fn()
+ const mockFn = vi.fn()
const { getByRole } = render()
await user.type(getByRole("textbox"), "Hello")
diff --git a/packages/components/src/TimeField/TimeField.spec.tsx b/packages/components/src/TimeField/TimeField.spec.tsx
index 9f946a361c5..27424bb53bf 100644
--- a/packages/components/src/TimeField/TimeField.spec.tsx
+++ b/packages/components/src/TimeField/TimeField.spec.tsx
@@ -1,12 +1,12 @@
import React, { useState } from "react"
import { render, screen, waitFor } from "@testing-library/react"
import userEvent from "@testing-library/user-event"
+import { vi } from "vitest"
import { TimeField, TimeFieldProps } from "./TimeField"
import { ValueType } from "./types"
-
const user = userEvent.setup()
-const mockOnChange = jest.fn()
+const mockOnChange = vi.fn()
const LABEL = "Launch Time Label"
const pressArrowKey =
diff --git a/packages/components/src/TitleBlockZen/TitleBlockZen.spec.tsx b/packages/components/src/TitleBlockZen/TitleBlockZen.spec.tsx
index 841f73611f9..8e14bd512e8 100644
--- a/packages/components/src/TitleBlockZen/TitleBlockZen.spec.tsx
+++ b/packages/components/src/TitleBlockZen/TitleBlockZen.spec.tsx
@@ -1,12 +1,28 @@
import React from "react"
import { render, waitFor, screen, within } from "@testing-library/react"
import userEvent from "@testing-library/user-event"
-import { mockMatchMedia } from "~components/utils/useMediaQueries.spec"
+import { vi } from "vitest"
import { CustomBreadcrumbProps, SectionTitleRenderProps } from "./types"
import { TitleBlockZen } from "./index"
const user = userEvent.setup()
+const mockMatchMedia = (matches: boolean = false): void => {
+ Object.defineProperty(window, "matchMedia", {
+ writable: true,
+ value: vi.fn().mockImplementation(query => ({
+ matches,
+ media: query,
+ onchange: null,
+ addListener: vi.fn(), // Deprecated
+ removeListener: vi.fn(), // Deprecated
+ addEventListener: vi.fn(),
+ removeEventListener: vi.fn(),
+ dispatchEvent: vi.fn(),
+ })),
+ })
+}
+
describe(" ", () => {
beforeEach(() => {
mockMatchMedia()
@@ -41,7 +57,7 @@ describe(" ", () => {
})
describe("when the primary action is a button with only an onClick", () => {
- const testOnClickFn = jest.fn()
+ const testOnClickFn = vi.fn()
const primaryActionAsButton = {
label: "primaryActionLabel",
onClick: testOnClickFn,
@@ -84,7 +100,7 @@ describe(" ", () => {
})
describe("when the primary action is disabled", () => {
- const testOnClickFn = jest.fn()
+ const testOnClickFn = vi.fn()
const primaryActionAsButton = {
label: "primaryActionLabel",
onClick: testOnClickFn,
@@ -166,7 +182,7 @@ describe(" ", () => {
})
describe("when the primary action is a button with both an href and an onClick", () => {
- const testOnClickFn = jest.fn()
+ const testOnClickFn = vi.fn()
const primaryActionAsLinkAndOnClick = {
label: "primaryActionLabel",
href: "#primaryActionHref",
@@ -307,7 +323,7 @@ describe(" ", () => {
})
describe("when the default action is a button with only an onClick", () => {
- const testOnClickFn = jest.fn()
+ const testOnClickFn = vi.fn()
const defaultActionAsButton = {
label: "defaultActionLabel",
onClick: testOnClickFn,
@@ -363,7 +379,7 @@ describe(" ", () => {
})
describe("when the default action is a button with both an href and an onClick", () => {
- const testOnClickFn = jest.fn()
+ const testOnClickFn = vi.fn()
const defaultActionAsLinkAndOnClick = {
label: "defaultActionLabel",
href: "#defaultActionHref",
@@ -423,7 +439,7 @@ describe(" ", () => {
})
describe("when the default action is disabled", () => {
- const testOnClickFn = jest.fn()
+ const testOnClickFn = vi.fn()
const defaultActionAsButton = {
label: "defaultActionLabel",
onClick: testOnClickFn,
@@ -504,7 +520,7 @@ describe(" ", () => {
})
describe("when a secondary action is passed with both an href and an onClick", () => {
- const testOnClickFn = jest.fn()
+ const testOnClickFn = vi.fn()
const secondaryActionWithLinkAndOnClick = {
label: "secondaryActionLabel",
href: "#secondaryActionHref",
@@ -516,8 +532,8 @@ describe(" ", () => {
})
it("renders the secondary action with both the href and onClick", async () => {
- const mockWarnFn = jest.fn()
- const spy = jest
+ const mockWarnFn = vi.fn()
+ const spy = vi
.spyOn(global.console, "warn")
.mockImplementation(mockWarnFn)
const { getByTestId } = render(
@@ -543,8 +559,8 @@ describe(" ", () => {
})
it("renders the action as a single mobile actions drawer item with an onClick", async () => {
- const mockWarnFn = jest.fn()
- const spy = jest
+ const mockWarnFn = vi.fn()
+ const spy = vi
.spyOn(global.console, "warn")
.mockImplementation(mockWarnFn)
const { getAllByTestId } = render(
@@ -681,7 +697,7 @@ describe(" ", () => {
})
describe("when a disabled secondary action is passed with only an onClick", () => {
- const testOnClickFn = jest.fn()
+ const testOnClickFn = vi.fn()
const secondaryActionWithOnClick = {
label: "secondaryActionLabel",
onClick: testOnClickFn,
@@ -708,7 +724,7 @@ describe(" ", () => {
})
describe("when a disabled secondary overflow menu item is passed with only an onClick for the action", () => {
- const testOnClickFn = jest.fn()
+ const testOnClickFn = vi.fn()
const secondaryOverflowMenuItemWithOnClick = {
label: "secondaryActionOverflowMenuItemLabel",
action: testOnClickFn,
@@ -737,54 +753,6 @@ describe(" ", () => {
})
})
- describe("survey status", () => {
- it("doesn't render tag when field is omitted", async () => {
- render(Example )
-
- await waitFor(() => {
- expect(
- screen.queryByTestId("survey-status-tag")
- ).not.toBeInTheDocument()
- })
- })
-
- it.each([
- ["draft", "statusDraft"],
- ["live", "statusLive"],
- ["closed", "statusClosed"],
- ["scheduled", "statusClosed"],
- ["sentimentPositive", "sentimentPositive"],
- ["default", "default"],
- ])(
- "renders tag with correct text and variant when %s status",
- async (status, expectedClassName) => {
- render(
-
- Example
-
- )
-
- const tagElement = (await screen.findByTestId("survey-status-tag"))
- .firstChild
-
- expect(tagElement).toHaveTextContent(`${status} text`)
- expect(tagElement).toHaveClass(expectedClassName)
- }
- )
- })
-
describe("automation ID behaviour", () => {
describe("when default automation IDs are not provided alongside required conditional renders", () => {
it("renders the default automation IDs", () => {
@@ -807,7 +775,7 @@ describe(" ", () => {
breadcrumb={{
text: "Test Breadcrumb",
path: "/",
- handleClick: jest.fn(),
+ handleClick: vi.fn(),
}}
sectionTitle="Test Section Title"
sectionTitleDescription="Test Section Title Description"
@@ -845,7 +813,7 @@ describe(" ", () => {
breadcrumb={{
text: "Test Breadcrumb",
path: "/",
- handleClick: jest.fn(),
+ handleClick: vi.fn(),
}}
sectionTitle="Test Section Title"
sectionTitleDescription="Test Section Title Description"
@@ -909,7 +877,7 @@ describe(" ", () => {
})
it("renders a custom component when you pass a 'render' prop", async () => {
- const mockFn = jest.fn()
+ const mockFn = vi.fn()
const CustomComponent = (props: CustomBreadcrumbProps): JSX.Element => (
// eslint-disable-next-line jsx-a11y/click-events-have-key-events, jsx-a11y/no-static-element-interactions
@@ -1018,7 +986,7 @@ describe(" ", () => {
})
it("will render custom button with functional onClick", async () => {
- const testClickFunc = jest.fn()
+ const testClickFunc = vi.fn()
render(
", () => {
})
it("will render custom button with children and not label", () => {
- const testClickFunc = jest.fn()
+ const testClickFunc = vi.fn()
render(
", () => {
})
it("will render the component in the top list of the Drawer content if it is a clickable button", () => {
- const testClickFunc = jest.fn()
+ const testClickFunc = vi.fn()
render(
,
],
},
- decorators: [
- Story => (
-
-
-
- ),
- ],
} satisfies Meta
export default meta
@@ -152,7 +145,7 @@ export const HasLongTitle: Story = {
args: { title: "A long title with over thirty characters" },
}
-export const StickerSheetDefault: Story = {
+export const StickerSheetBreadcrumbs: Story = {
parameters: {
docs: {
canvas: {
@@ -208,4 +201,81 @@ export const StickerSheetDefault: Story = {
),
+ name: "Sticker Sheet (Breadcrumb)",
+}
+
+export const StickerSheetDefault: Story = {
+ render: () => (
+
+
+
+
+ Draft
+
+
+
+
+ Default
+
+
+
+
+ Due
+
+
+
+
+ Overdue
+
+
+
+
+ Completed
+
+
+
+
+ Completed
+
+
+
+
+ ),
+ name: "Sticker Sheet (Survey Status)",
}
diff --git a/packages/components/src/TitleBlockZen/subcomponents/MobileActions.spec.tsx b/packages/components/src/TitleBlockZen/subcomponents/MobileActions.spec.tsx
index 239c58ce7e9..eab37ffd802 100644
--- a/packages/components/src/TitleBlockZen/subcomponents/MobileActions.spec.tsx
+++ b/packages/components/src/TitleBlockZen/subcomponents/MobileActions.spec.tsx
@@ -1,8 +1,8 @@
import React from "react"
import { render, screen, waitFor } from "@testing-library/react"
import userEvent from "@testing-library/user-event"
+import { vi } from "vitest"
import { MobileActions } from "./MobileActions"
-
const user = userEvent.setup()
const MENU_LINKS = [
@@ -147,7 +147,7 @@ describe(" ", () => {
describe("when autoHide is true", () => {
beforeEach(() => {
- window.alert = jest.fn()
+ window.alert = vi.fn()
render(
{
describe("with a render prop", () => {
it("renders the component passed with the navigation tab props", async () => {
- const handleClick = jest.fn()
+ const handleClick = vi.fn()
const text = "I am also navigation tabs"
const href = "www.cultureamp.com"
render(
@@ -50,7 +52,11 @@ describe("NavigationTabs", () => {
const button = screen.getByRole("button", {
name: `${href} - ${text} - true`,
})
- expect(button).toHaveClass("linkAnchor", "active", "lightBackground")
+ expect(button).toHaveClass(
+ styles.linkAnchor,
+ styles.active,
+ styles.lightBackground
+ )
await user.click(button)
await waitFor(() => {
diff --git a/packages/components/src/ToggleSwitch/ToggleSwitch/ToggleSwitch.spec.tsx b/packages/components/src/ToggleSwitch/ToggleSwitch/ToggleSwitch.spec.tsx
index fc84f735872..7d378480644 100644
--- a/packages/components/src/ToggleSwitch/ToggleSwitch/ToggleSwitch.spec.tsx
+++ b/packages/components/src/ToggleSwitch/ToggleSwitch/ToggleSwitch.spec.tsx
@@ -1,13 +1,13 @@
import React from "react"
import { render, screen, waitFor } from "@testing-library/react"
import userEvent from "@testing-library/user-event"
+import { vi } from "vitest"
import { ToggleSwitch, ToggleSwitchProps } from "./ToggleSwitch"
-
const user = userEvent.setup()
const defaultToggleSwitchProps = {
id: "someToggleSwitchId",
- onToggle: jest.fn(),
+ onToggle: vi.fn(),
}
const renderToggleSwitch = (
diff --git a/packages/components/src/__actions__/Menu/v1/Menu.spec.tsx b/packages/components/src/__actions__/Menu/v1/Menu.spec.tsx
index 415a5b85b7c..72e0ffaccba 100644
--- a/packages/components/src/__actions__/Menu/v1/Menu.spec.tsx
+++ b/packages/components/src/__actions__/Menu/v1/Menu.spec.tsx
@@ -23,7 +23,7 @@ describe("Dropdown", () => {
})
it("shows menu & handles onClick set by the consumer when clicking on the button", async () => {
- const onButtonClick = jest.fn()
+ const onButtonClick = vi.fn()
render(
}>
@@ -42,7 +42,7 @@ describe("Dropdown", () => {
})
})
it("shows menu & handles onMouseDown set by the consumer when mousing down on the button", async () => {
- const onMouseDown = jest.fn()
+ const onMouseDown = vi.fn()
render(
}>
diff --git a/packages/components/src/__containers__/GuidanceBlock/v1/GuidanceBlock.spec.tsx b/packages/components/src/__containers__/GuidanceBlock/v1/GuidanceBlock.spec.tsx
index 41fb8be2922..a9d0032f00c 100644
--- a/packages/components/src/__containers__/GuidanceBlock/v1/GuidanceBlock.spec.tsx
+++ b/packages/components/src/__containers__/GuidanceBlock/v1/GuidanceBlock.spec.tsx
@@ -1,25 +1,25 @@
import React from "react"
import { cleanup, render, waitFor } from "@testing-library/react"
import userEvent from "@testing-library/user-event"
+import { vi } from "vitest"
import { Informative } from "~components/Illustration"
import { GuidanceBlock } from "./GuidanceBlock"
-
const user = userEvent.setup()
// eslint-disable-next-line ssr-friendly/no-dom-globals-in-module-scope
-window.matchMedia = jest.fn().mockImplementation(() => ({
+window.matchMedia = vi.fn().mockImplementation(() => ({
matches: false,
media: "",
onchange: null,
- addListener: jest.fn(),
- removeListener: jest.fn(),
+ addListener: vi.fn(),
+ removeListener: vi.fn(),
}))
describe("GuidanceBlock", () => {
afterEach(cleanup)
it("calls the action function when action button is clicked", async () => {
- const onAction = jest.fn()
+ const onAction = vi.fn()
const { container } = render(
}
diff --git a/packages/components/src/__containers__/GuidanceBlock/v2/GuidanceBlock.spec.tsx b/packages/components/src/__containers__/GuidanceBlock/v2/GuidanceBlock.spec.tsx
index 41fb8be2922..a9d0032f00c 100644
--- a/packages/components/src/__containers__/GuidanceBlock/v2/GuidanceBlock.spec.tsx
+++ b/packages/components/src/__containers__/GuidanceBlock/v2/GuidanceBlock.spec.tsx
@@ -1,25 +1,25 @@
import React from "react"
import { cleanup, render, waitFor } from "@testing-library/react"
import userEvent from "@testing-library/user-event"
+import { vi } from "vitest"
import { Informative } from "~components/Illustration"
import { GuidanceBlock } from "./GuidanceBlock"
-
const user = userEvent.setup()
// eslint-disable-next-line ssr-friendly/no-dom-globals-in-module-scope
-window.matchMedia = jest.fn().mockImplementation(() => ({
+window.matchMedia = vi.fn().mockImplementation(() => ({
matches: false,
media: "",
onchange: null,
- addListener: jest.fn(),
- removeListener: jest.fn(),
+ addListener: vi.fn(),
+ removeListener: vi.fn(),
}))
describe("GuidanceBlock", () => {
afterEach(cleanup)
it("calls the action function when action button is clicked", async () => {
- const onAction = jest.fn()
+ const onAction = vi.fn()
const { container } = render(
}
diff --git a/packages/components/src/__future__/Select/Select.spec.tsx b/packages/components/src/__future__/Select/Select.spec.tsx
index 2e57d89cbc5..5bd0008d2de 100644
--- a/packages/components/src/__future__/Select/Select.spec.tsx
+++ b/packages/components/src/__future__/Select/Select.spec.tsx
@@ -1,9 +1,9 @@
import React from "react"
import { render, waitFor, screen, within } from "@testing-library/react"
import userEvent from "@testing-library/user-event"
+import { vi } from "vitest"
import { Select, SelectProps } from "./Select"
import { singleMockItems } from "./_docs/mockData"
-
const user = userEvent.setup()
const SelectWrapper = ({
@@ -87,7 +87,7 @@ describe(" ", () => {
})
it("fires the onOpenChange callback when the trigger is interacted", async () => {
- const onOpenChange = jest.fn()
+ const onOpenChange = vi.fn()
const { getByRole } = render(
", () => {
describe("Selection - Mouse interaction", () => {
it("fires onSelectionChange when clicks on a option", async () => {
- const spy = jest.fn()
+ const spy = vi.fn()
const { getByRole } = render(
)
@@ -335,7 +335,7 @@ describe(" ", () => {
})
it("fires onSelectionChange when hits enter on a option", async () => {
- const spy = jest.fn()
+ const spy = vi.fn()
const { getByRole } = render( )
await user.tab()
diff --git a/packages/components/src/__overlays__/Tooltip/v1/Tooltip.spec.tsx b/packages/components/src/__overlays__/Tooltip/v1/Tooltip.spec.tsx
index 76ce00ca3a1..862a5bf1f39 100644
--- a/packages/components/src/__overlays__/Tooltip/v1/Tooltip.spec.tsx
+++ b/packages/components/src/__overlays__/Tooltip/v1/Tooltip.spec.tsx
@@ -48,7 +48,7 @@ describe(" ", () => {
// Non-semantic elements without roles should not have aria-description on them.
// They won't read to all screen readers as expected and may be reported in Storybook's accessibility tab (which uses Axe under the hood)
it("doesn't add an accessible description when wrapping a non-semantic element", async () => {
- const warn = jest.spyOn(console, "warn").mockImplementation()
+ const warn = vi.spyOn(console, "warn").mockImplementation(vi.fn())
render(
-
-describe(" ", () => {
- beforeEach(() => {
- mockReturnValue = jest.fn()
- mockReturnValue.cancel = (): void => undefined
- useDebouncedCallback.mockImplementation(() => mockReturnValue)
- })
-
- describe("When no animationDuration prop is given", () => {
- it("calls useDebouncedCallback with a 400 ms delay", () => {
- render( )
- expect(useDebouncedCallback).toHaveBeenCalledWith(
- expect.anything(),
- 400,
- expect.anything()
- )
- })
- })
- describe("When an animationDuration prop is given", () => {
- it("calls useDebouncedCallback with the animationDuration value", () => {
- const expected = 1000
- render( )
- expect(useDebouncedCallback).toHaveBeenCalledWith(
- expect.anything(),
- expected,
- expect.anything()
- )
- })
- })
-})
diff --git a/packages/components/src/__overlays__/Tooltip/v1/utils/isSemanticElement.spec.tsx b/packages/components/src/__overlays__/Tooltip/v1/utils/isSemanticElement.spec.tsx
index cc4d74f495c..bf271523f98 100644
--- a/packages/components/src/__overlays__/Tooltip/v1/utils/isSemanticElement.spec.tsx
+++ b/packages/components/src/__overlays__/Tooltip/v1/utils/isSemanticElement.spec.tsx
@@ -1,13 +1,13 @@
import React from "react"
+import { vi } from "vitest"
import { ArrowRightIcon } from "~components/Icon"
import { Button, IconButton } from "~components/__actions__/v2"
import { isSemanticElement } from "./isSemanticElement"
-
describe("isSemanticElement", () => {
it("returns true if provided a native element with a semantic role", () => {
expect(
isSemanticElement(
-
+
click
)
@@ -28,19 +28,14 @@ describe("isSemanticElement", () => {
it("will return true if provided a non-semantic element with a semantic role", () => {
expect(
isSemanticElement(
-
+
custom semantic el
)
).toBe(true)
expect(
isSemanticElement(
-
+
custom semantic el
)
diff --git a/packages/components/src/utils/useMediaQueries.spec.tsx b/packages/components/src/utils/useMediaQueries.spec.tsx
index 4c04c7595fb..c5103d9aea2 100644
--- a/packages/components/src/utils/useMediaQueries.spec.tsx
+++ b/packages/components/src/utils/useMediaQueries.spec.tsx
@@ -1,7 +1,7 @@
import React from "react"
import { render, screen } from "@testing-library/react"
+import { vi } from "vitest"
import { useMediaQueries, subtractOnePixel } from "./useMediaQueries"
-
const ExampleComponent = (): JSX.Element => {
const { queries, components } = useMediaQueries({
prefersReducedMotion: "(prefers-reduced-motion: reduce)",
@@ -27,15 +27,15 @@ const ExampleComponent = (): JSX.Element => {
export const mockMatchMedia = (matches: boolean = false): void => {
Object.defineProperty(window, "matchMedia", {
writable: true,
- value: jest.fn().mockImplementation(query => ({
+ value: vi.fn().mockImplementation(query => ({
matches,
media: query,
onchange: null,
- addListener: jest.fn(), // Deprecated
- removeListener: jest.fn(), // Deprecated
- addEventListener: jest.fn(),
- removeEventListener: jest.fn(),
- dispatchEvent: jest.fn(),
+ addListener: vi.fn(), // Deprecated
+ removeListener: vi.fn(), // Deprecated
+ addEventListener: vi.fn(),
+ removeEventListener: vi.fn(),
+ dispatchEvent: vi.fn(),
})),
})
}
diff --git a/packages/components/svgo.spec.ts b/packages/components/svgo.spec.ts
index dc75d337919..93cab4b5621 100644
--- a/packages/components/svgo.spec.ts
+++ b/packages/components/svgo.spec.ts
@@ -1,3 +1,5 @@
+import { describe } from "vitest"
+
const {
removeRootSVGElement,
replaceAttrKeys,
diff --git a/packages/components/tsconfig.json b/packages/components/tsconfig.json
index 276f673f2cc..0bfd6a702d6 100644
--- a/packages/components/tsconfig.json
+++ b/packages/components/tsconfig.json
@@ -4,11 +4,9 @@
"baseUrl": ".",
"paths": {
"~storybook/*": ["../../docs/*"],
- "~tests": ["./__tests__/index"],
- "~tests/*": ["./__tests__/*"],
"~components/*": ["./src/*"]
},
- "types": ["@testing-library/jest-dom"]
+ "types": ["@testing-library/jest-dom", "vitest/globals"]
},
"include": ["src/**/*", "__tests__/**/*", "codemods/**/*"],
"exclude": ["node_modules"],
diff --git a/packages/design-tokens/jest.config.ts b/packages/design-tokens/jest.config.ts
deleted file mode 100644
index afb26946077..00000000000
--- a/packages/design-tokens/jest.config.ts
+++ /dev/null
@@ -1,2 +0,0 @@
-import sharedConfig from "../../jest.config"
-export default sharedConfig
diff --git a/packages/design-tokens/jest.setup.ts b/packages/design-tokens/jest.setup.ts
deleted file mode 100644
index 017691afb46..00000000000
--- a/packages/design-tokens/jest.setup.ts
+++ /dev/null
@@ -1 +0,0 @@
-import "../../jest.setup"
diff --git a/packages/design-tokens/package.json b/packages/design-tokens/package.json
index 8cb5228f29f..016eaecc4fc 100644
--- a/packages/design-tokens/package.json
+++ b/packages/design-tokens/package.json
@@ -25,8 +25,7 @@
"sideEffects": true,
"scripts": {
"lint:ts": "tsc --noEmit",
- "test": "FORCE_COLOR=1 jest",
- "test:ci": "pnpm test -- --ci",
+ "test": "FORCE_COLOR=1 vitest --config ../../vite.config.ts",
"build": "pnpm clean:dist && pnpm build:json && pnpm build:less && pnpm build:sass && pnpm build:ts",
"build:json": "tsx ./bin/buildCssVarTokens.ts",
"build:ts": "pnpm package-bundler build",
diff --git a/packages/design-tokens/src/__tests__/sass-tokens.spec.ts b/packages/design-tokens/src/__tests__/sass-tokens.spec.ts
index 77eff120a50..c93deffedba 100644
--- a/packages/design-tokens/src/__tests__/sass-tokens.spec.ts
+++ b/packages/design-tokens/src/__tests__/sass-tokens.spec.ts
@@ -1,4 +1,3 @@
-/* eslint-disable jest/consistent-test-it */
import fs from "fs"
import path from "path"
import PostCSS, { Declaration } from "postcss"
@@ -28,7 +27,7 @@ ${typography.toString()}
`
)
describe("everything", () => {
- test("no tokens start with kz", () => {
+ it("no tokens start with kz", () => {
const allTokensStartingWithKz = everything.nodes
.filter(
(n): n is Declaration => n.type === "decl" && n.prop.startsWith("$kz")
@@ -39,7 +38,7 @@ ${typography.toString()}
})
describe("colors", () => {
- test("new un-prefixed tokens only contain heart color names", () => {
+ it("new un-prefixed tokens only contain heart color names", () => {
const newColors = colors.nodes.filter(
(n): n is Declaration =>
n.type === "decl" && n.prop.startsWith("$color")
@@ -56,7 +55,7 @@ ${typography.toString()}
})
describe("layout", () => {
- test("new un-prefixed layout tokens are not CSS variables", () => {
+ it("new un-prefixed layout tokens are not CSS variables", () => {
expect(
layout.nodes.filter(
n =>
diff --git a/packages/design-tokens/src/lib/__tests__/makeCssVariableDefinitionsMap.spec.ts b/packages/design-tokens/src/lib/__tests__/makeCssVariableDefinitionsMap.spec.ts
index 0d6c84e3aa8..825921e9542 100644
--- a/packages/design-tokens/src/lib/__tests__/makeCssVariableDefinitionsMap.spec.ts
+++ b/packages/design-tokens/src/lib/__tests__/makeCssVariableDefinitionsMap.spec.ts
@@ -18,7 +18,7 @@ describe("makeCssVariableDefinitionsMap()", () => {
).filter(key => key.startsWith("--color-"))
it("produces heart color vars", () => {
cssVariableKeysThatAreColors.forEach(key => {
- // eslint-disable-next-line jest/no-conditional-expect
+ // eslint-disable-next-line vitest/no-conditional-expect
if (key.startsWith("--color")) expect(key).toMatch(heartColorNamePattern)
})
})
diff --git a/packages/design-tokens/tsconfig.json b/packages/design-tokens/tsconfig.json
index 7fdd48bb8fd..5655bb4e5e7 100644
--- a/packages/design-tokens/tsconfig.json
+++ b/packages/design-tokens/tsconfig.json
@@ -7,7 +7,8 @@
"~design-tokens/*": ["../design-tokens/src/*"],
"~components/*": ["../components/src/*"],
"~tailwind/*": ["./src/*"]
- }
+ },
+ "types": ["vitest/globals"]
},
"include": ["src/**/*", "_docs/**/*"],
"files": ["./types.d.ts"]
diff --git a/packages/tailwind/package.json b/packages/tailwind/package.json
index eee2027cfde..742f54feec2 100644
--- a/packages/tailwind/package.json
+++ b/packages/tailwind/package.json
@@ -4,6 +4,7 @@
"description": "Kaizen Tailwind presets",
"scripts": {
"build": "pnpm package-bundler build",
+ "test": "vitest --config ../../vite.config.ts",
"clean": "rimraf 'dist' 'node_modules' '.turbo'",
"lint:ts": "tsc --noEmit"
},
diff --git a/packages/tailwind/tsconfig.json b/packages/tailwind/tsconfig.json
index 037fa96ed52..5f4dd368249 100644
--- a/packages/tailwind/tsconfig.json
+++ b/packages/tailwind/tsconfig.json
@@ -7,7 +7,8 @@
"~design-tokens/*": ["../design-tokens/src/*"],
"~components/*": ["../components/src/*"],
"~tailwind/*": ["./src/*"]
- }
+ },
+ "types": ["vitest/globals"]
},
"include": ["src/**/*"],
"files": ["./types.d.ts"]
diff --git a/pnpm-lock.yaml b/pnpm-lock.yaml
index 9c9579917c1..8335d15c38b 100644
--- a/pnpm-lock.yaml
+++ b/pnpm-lock.yaml
@@ -35,7 +35,7 @@ importers:
version: 8.2.9(storybook@8.3.0-alpha.7)
'@storybook/addon-interactions':
specifier: ^8.2.9
- version: 8.2.9(@jest/globals@29.7.0)(@types/jest@29.5.12)(jest@29.7.0(@types/node@20.14.15)(ts-node@10.9.2(@swc/core@1.7.10(@swc/helpers@0.5.11))(@types/node@20.14.15)(typescript@5.5.4)))(storybook@8.3.0-alpha.7)
+ version: 8.2.9(@jest/globals@29.7.0)(@types/jest@29.5.12)(jest@29.7.0(@types/node@20.14.15)(ts-node@10.9.2(@swc/core@1.7.10(@swc/helpers@0.5.11))(@types/node@20.14.15)(typescript@5.5.4)))(storybook@8.3.0-alpha.7)(vitest@2.0.5(@types/node@20.14.15)(jsdom@20.0.3)(less@4.2.0)(sass@1.77.8)(stylus@0.62.0)(terser@5.31.5))
'@storybook/addon-links':
specifier: ^8.2.9
version: 8.2.9(react@18.3.1)(storybook@8.3.0-alpha.7)
@@ -53,31 +53,22 @@ importers:
version: 8.2.9(react-dom@18.3.1(react@18.3.1))(react@18.3.1)(storybook@8.3.0-alpha.7)(typescript@5.5.4)
'@storybook/test':
specifier: ^8.2.9
- version: 8.2.9(@jest/globals@29.7.0)(@types/jest@29.5.12)(jest@29.7.0(@types/node@20.14.15)(ts-node@10.9.2(@swc/core@1.7.10(@swc/helpers@0.5.11))(@types/node@20.14.15)(typescript@5.5.4)))(storybook@8.3.0-alpha.7)
+ version: 8.2.9(@jest/globals@29.7.0)(@types/jest@29.5.12)(jest@29.7.0(@types/node@20.14.15)(ts-node@10.9.2(@swc/core@1.7.10(@swc/helpers@0.5.11))(@types/node@20.14.15)(typescript@5.5.4)))(storybook@8.3.0-alpha.7)(vitest@2.0.5(@types/node@20.14.15)(jsdom@20.0.3)(less@4.2.0)(sass@1.77.8)(stylus@0.62.0)(terser@5.31.5))
'@storybook/theming':
specifier: ^8.2.9
version: 8.2.9(storybook@8.3.0-alpha.7)
'@stylistic/eslint-plugin':
specifier: ^2.6.4
version: 2.6.4(eslint@8.57.0)(typescript@5.5.4)
- '@testing-library/dom':
- specifier: ^10.4.0
- version: 10.4.0
'@testing-library/jest-dom':
- specifier: ^6.4.8
- version: 6.4.8
+ specifier: ^6.5.0
+ version: 6.5.0
'@testing-library/react':
specifier: ^16.0.0
- version: 16.0.0(@testing-library/dom@10.4.0)(@types/react-dom@18.3.0)(@types/react@18.3.4)(react-dom@18.3.1(react@18.3.1))(react@18.3.1)
+ version: 16.0.0(@testing-library/dom@10.1.0)(@types/react-dom@18.3.0)(@types/react@18.3.4)(react-dom@18.3.1(react@18.3.1))(react@18.3.1)
'@testing-library/user-event':
specifier: ^14.5.2
- version: 14.5.2(@testing-library/dom@10.4.0)
- '@types/jest':
- specifier: ^29.5.12
- version: 29.5.12
- '@types/jest-axe':
- specifier: ^3.5.9
- version: 3.5.9
+ version: 14.5.2(@testing-library/dom@10.1.0)
'@types/node':
specifier: ^20.14.12
version: 20.14.15
@@ -108,9 +99,6 @@ importers:
eslint-plugin-import:
specifier: ^2.29.1
version: 2.29.1(@typescript-eslint/parser@8.1.0(eslint@8.57.0)(typescript@5.5.4))(eslint-import-resolver-typescript@3.6.1)(eslint@8.57.0)
- eslint-plugin-jest:
- specifier: ^27.9.0
- version: 27.9.0(@typescript-eslint/eslint-plugin@8.1.0(@typescript-eslint/parser@8.1.0(eslint@8.57.0)(typescript@5.5.4))(eslint@8.57.0)(typescript@5.5.4))(eslint@8.57.0)(jest@29.7.0(@types/node@20.14.15)(ts-node@10.9.2(@swc/core@1.7.10(@swc/helpers@0.5.11))(@types/node@20.14.15)(typescript@5.5.4)))(typescript@5.5.4)
eslint-plugin-jsx-a11y:
specifier: ^6.9.0
version: 6.9.0(eslint@8.57.0)
@@ -129,21 +117,9 @@ importers:
eslint-plugin-storybook:
specifier: ^0.8.0
version: 0.8.0(eslint@8.57.0)(typescript@5.5.4)
- jest:
- specifier: ^29.7.0
- version: 29.7.0(@types/node@20.14.15)(babel-plugin-macros@3.1.0)(ts-node@10.9.2(@swc/core@1.7.10(@swc/helpers@0.5.11))(@types/node@20.14.15)(typescript@5.5.4))
- jest-axe:
- specifier: ^9.0.0
- version: 9.0.0
- jest-canvas-mock:
- specifier: ^2.5.2
- version: 2.5.2
- jest-environment-jsdom:
- specifier: ^29.7.0
- version: 29.7.0
- jest-static-stubs:
- specifier: ^0.0.1
- version: 0.0.1
+ eslint-plugin-vitest:
+ specifier: ^0.5.4
+ version: 0.5.4(@typescript-eslint/eslint-plugin@8.1.0(@typescript-eslint/parser@8.1.0(eslint@8.57.0)(typescript@5.5.4))(eslint@8.57.0)(typescript@5.5.4))(eslint@8.57.0)(typescript@5.5.4)(vitest@2.0.5(@types/node@20.14.15)(jsdom@20.0.3)(less@4.2.0)(sass@1.77.8)(stylus@0.62.0)(terser@5.31.5))
node-fetch:
specifier: ^3.3.2
version: 3.3.2
@@ -171,18 +147,21 @@ importers:
stylelint-config-standard-scss:
specifier: ^13.1.0
version: 13.1.0(postcss@8.4.41)(stylelint@16.8.2(typescript@5.5.4))
- ts-jest:
- specifier: ^29.2.4
- version: 29.2.4(@babel/core@7.25.2)(@jest/transform@29.7.0)(@jest/types@29.6.3)(babel-jest@29.7.0(@babel/core@7.25.2))(esbuild@0.23.0)(jest@29.7.0(@types/node@20.14.15)(ts-node@10.9.2(@swc/core@1.7.10(@swc/helpers@0.5.11))(@types/node@20.14.15)(typescript@5.5.4)))(typescript@5.5.4)
- ts-node:
- specifier: ^10.9.2
- version: 10.9.2(@swc/core@1.7.10(@swc/helpers@0.5.11))(@types/node@20.14.15)(typescript@5.5.4)
turbo:
specifier: ^2.0.14
version: 2.0.14
typescript:
specifier: ^5.5.4
version: 5.5.4
+ vite:
+ specifier: ^5.4.2
+ version: 5.4.2(@types/node@20.14.15)(less@4.2.0)(sass@1.77.8)(stylus@0.62.0)(terser@5.31.5)
+ vitest:
+ specifier: ^2.0.5
+ version: 2.0.5(@types/node@20.14.15)(jsdom@20.0.3)(less@4.2.0)(sass@1.77.8)(stylus@0.62.0)(terser@5.31.5)
+ vitest-axe:
+ specifier: ^0.1.0
+ version: 0.1.0(vitest@2.0.5(@types/node@20.14.15)(jsdom@20.0.3)(less@4.2.0)(sass@1.77.8)(stylus@0.62.0)(terser@5.31.5))
docs:
dependencies:
@@ -192,6 +171,9 @@ importers:
react-dom:
specifier: ^18.3.1
version: 18.3.1(react@18.3.1)
+ vite:
+ specifier: '>=5.4.2'
+ version: 5.4.2(@types/node@20.14.15)(less@4.2.0)(sass@1.77.8)(stylus@0.62.0)(terser@5.31.5)
devDependencies:
'@kaizen/components':
specifier: workspace:*
@@ -205,6 +187,9 @@ importers:
'@rollup/plugin-alias':
specifier: ^5.1.0
version: 5.1.0(rollup@4.20.0)
+ '@storybook/builder-vite':
+ specifier: ^8.2.9
+ version: 8.2.9(storybook@8.2.9(@babel/preset-env@7.25.3(@babel/core@7.25.2)))(typescript@5.5.4)(vite@5.4.2(@types/node@20.14.15)(less@4.2.0)(sass@1.77.8)(stylus@0.62.0)(terser@5.31.5))
'@storybook/manager-api':
specifier: ^8.2.9
version: 8.2.9(storybook@8.2.9(@babel/preset-env@7.25.3(@babel/core@7.25.2)))
@@ -232,6 +217,9 @@ importers:
highlight.js:
specifier: ^11.10.0
version: 11.10.0
+ jest-axe:
+ specifier: ^9.0.0
+ version: 9.0.0
sass:
specifier: ^1.77.8
version: 1.77.8
@@ -241,9 +229,9 @@ importers:
tailwindcss:
specifier: ^3.4.10
version: 3.4.10(ts-node@10.9.2(@swc/core@1.7.10(@swc/helpers@0.5.11))(@types/node@20.14.15)(typescript@5.5.4))
- vite:
- specifier: ^5.4.2
- version: 5.4.2(@types/node@20.14.15)(less@4.2.0)(sass@1.77.8)(stylus@0.62.0)(terser@5.31.5)
+ vite-plugin-node-polyfills:
+ specifier: ^0.22.0
+ version: 0.22.0(rollup@4.20.0)(vite@5.4.2(@types/node@20.14.15)(less@4.2.0)(sass@1.77.8)(stylus@0.62.0)(terser@5.31.5))
packages/components:
dependencies:
@@ -413,6 +401,12 @@ importers:
'@tanstack/react-query':
specifier: ^5.51.23
version: 5.51.23(react@18.3.1)
+ '@testing-library/dom':
+ specifier: ^10.4.0
+ version: 10.4.0
+ '@types/jest-axe':
+ specifier: ^3.5.9
+ version: 3.5.9
'@types/lodash.debounce':
specifier: ^4.0.9
version: 4.0.9
@@ -434,6 +428,9 @@ importers:
identity-obj-proxy:
specifier: ^3.0.0
version: 3.0.0
+ jest-axe:
+ specifier: ^9.0.0
+ version: 9.0.0
lodash.isempty:
specifier: ^4.4.0
version: 4.4.0
@@ -482,9 +479,6 @@ importers:
svgo:
specifier: ^3.3.2
version: 3.3.2
- ts-jest:
- specifier: ^29.2.4
- version: 29.2.4(@babel/core@7.25.2)(@jest/transform@29.7.0)(@jest/types@29.6.3)(babel-jest@29.7.0(@babel/core@7.25.2))(esbuild@0.23.0)(jest@29.7.0(@types/node@20.14.15)(ts-node@10.9.2(@swc/core@1.7.10(@swc/helpers@0.5.11))(@types/node@20.14.15)(typescript@5.5.4)))(typescript@5.5.4)
tslib:
specifier: ^2.6.3
version: 2.6.3
@@ -3350,6 +3344,15 @@ packages:
rollup:
optional: true
+ '@rollup/plugin-inject@5.0.5':
+ resolution: {integrity: sha512-2+DEJbNBoPROPkgTDNe8/1YXWcqxbN5DTjASVIOx8HS+pITXushyNiBV56RB08zuptzz8gT3YfkqriTBVycepg==}
+ engines: {node: '>=14.0.0'}
+ peerDependencies:
+ rollup: ^1.20.0||^2.0.0||^3.0.0||^4.0.0
+ peerDependenciesMeta:
+ rollup:
+ optional: true
+
'@rollup/plugin-node-resolve@15.2.3':
resolution: {integrity: sha512-j/lym8nf5E21LwBT4Df1VD6hRO2L2iwUeUmP7litikRsVp1H6NWx20NEp0Y7su+7XGc476GnXXc4kFeZNGmaSQ==}
engines: {node: '>=14.0.0'}
@@ -3841,8 +3844,8 @@ packages:
vitest:
optional: true
- '@testing-library/jest-dom@6.4.8':
- resolution: {integrity: sha512-JD0G+Zc38f5MBHA4NgxQMR5XtO5Jx9g86jqturNTt2WUfRmLDIY7iKkWHDCCTiDuFMre6nxAD5wHw9W5kI4rGw==}
+ '@testing-library/jest-dom@6.5.0':
+ resolution: {integrity: sha512-xGGHpBXYSHUUr6XsKBfs85TWlYKpTc37cSBBVrXcib2MkHLboWlkClhWF37JKlDb9KEq3dHs+f2xR7XJEWGBxA==}
engines: {node: '>=14', npm: '>=6', yarn: '>=1'}
'@testing-library/react@16.0.0':
@@ -4014,9 +4017,6 @@ packages:
'@types/js-yaml@3.12.10':
resolution: {integrity: sha512-/Mtaq/wf+HxXpvhzFYzrzCqNRcA958sW++7JOFC8nPrZcvfi/TrzOaaGbvt27ltJB2NQbHVAg5a1wUCsyMH7NA==}
- '@types/jsdom@20.0.1':
- resolution: {integrity: sha512-d0r18sZPmMQr1eG35u12FZfhIXNrnsPU/g5wvRKCUf/tOGilKKwYMYGqh33BNR6ba+2gkHw1EUiHoN3mn7E5IQ==}
-
'@types/json-schema@7.0.15':
resolution: {integrity: sha512-5+fP8P8MFNC+AyZCDxrB2pkZFPGzqQWUzpSeuuVLvm8VMcorNYavBqoFcxK8bQz4Qsbn4oUEEem4wDLfcysGHA==}
@@ -4143,9 +4143,6 @@ packages:
'@types/through@0.0.33':
resolution: {integrity: sha512-HsJ+z3QuETzP3cswwtzt2vEIiHBk/dCcHGhbmG5X3ecnwFD/lPrMpliGXxSCg03L9AhrdwA4Oz/qfspkDW+xGQ==}
- '@types/tough-cookie@4.0.5':
- resolution: {integrity: sha512-/Ad8+nIOV7Rl++6f1BdKxFSMgmoqEoYbHRpPcx3JEfv8VRsQe9Z4mCXeJBzxs7mbHY/XOZZuXlRNfhpVPbs6ZA==}
-
'@types/unist@2.0.10':
resolution: {integrity: sha512-IfYcSBWE3hLpBg8+X2SEa8LVkJdJEkT2Ese2aaLs3ptGdVtABxndrMaxuFlQ1qdFf9Q5rDvDpxI3WwgvKFAsQA==}
@@ -4199,6 +4196,10 @@ packages:
resolution: {integrity: sha512-OwLUIWZJry80O99zvqXVEioyniJMa+d2GrqpUTqi5/v5D5rOrppJVBPa0yKCblcigC0/aYAzxxqQ1B+DS2RYsg==}
engines: {node: ^16.0.0 || >=18.0.0}
+ '@typescript-eslint/scope-manager@7.18.0':
+ resolution: {integrity: sha512-jjhdIE/FPF2B7Z1uzc6i3oWKbGcHb87Qw7AWj6jmEqNOfDFbJWtjt/XfwCpvNkpGWlcJaog5vTR+VV8+w9JflA==}
+ engines: {node: ^18.18.0 || >=20.0.0}
+
'@typescript-eslint/scope-manager@8.1.0':
resolution: {integrity: sha512-DsuOZQji687sQUjm4N6c9xABJa7fjvfIdjqpSIIVOgaENf2jFXiM9hIBZOL3hb6DHK9Nvd2d7zZnoMLf9e0OtQ==}
engines: {node: ^18.18.0 || ^20.9.0 || >=21.1.0}
@@ -4220,6 +4221,10 @@ packages:
resolution: {integrity: sha512-1kFmZ1rOm5epu9NZEZm1kckCDGj5UJEf7P1kliH4LKu/RkwpsfqqGmY2OOcUs18lSlQBKLDYBOGxRVtrMN5lpg==}
engines: {node: ^16.0.0 || >=18.0.0}
+ '@typescript-eslint/types@7.18.0':
+ resolution: {integrity: sha512-iZqi+Ds1y4EDYUtlOOC+aUmxnE9xS/yCigkjA7XpTKV6nCBd3Hp/PRGGmdwnfkV2ThMyYldP1wRpm/id99spTQ==}
+ engines: {node: ^18.18.0 || >=20.0.0}
+
'@typescript-eslint/types@8.1.0':
resolution: {integrity: sha512-q2/Bxa0gMOu/2/AKALI0tCKbG2zppccnRIRCW6BaaTlRVaPKft4oVYPp7WOPpcnsgbr0qROAVCVKCvIQ0tbWog==}
engines: {node: ^18.18.0 || ^20.9.0 || >=21.1.0}
@@ -4242,6 +4247,15 @@ packages:
typescript:
optional: true
+ '@typescript-eslint/typescript-estree@7.18.0':
+ resolution: {integrity: sha512-aP1v/BSPnnyhMHts8cf1qQ6Q1IFwwRvAQGRvBFkWlo3/lH29OXA3Pts+c10nxRxIBrDnoMqzhgdwVe5f2D6OzA==}
+ engines: {node: ^18.18.0 || >=20.0.0}
+ peerDependencies:
+ typescript: '*'
+ peerDependenciesMeta:
+ typescript:
+ optional: true
+
'@typescript-eslint/typescript-estree@8.1.0':
resolution: {integrity: sha512-NTHhmufocEkMiAord/g++gWKb0Fr34e9AExBRdqgWdVBaKoei2dIyYKD9Q0jBnvfbEA5zaf8plUFMUH6kQ0vGg==}
engines: {node: ^18.18.0 || ^20.9.0 || >=21.1.0}
@@ -4263,6 +4277,12 @@ packages:
peerDependencies:
eslint: ^7.0.0 || ^8.0.0
+ '@typescript-eslint/utils@7.18.0':
+ resolution: {integrity: sha512-kK0/rNa2j74XuHVcoCZxdFBMF+aq/vH83CXAOHieC+2Gis4mF8jJXT5eAfyD3K0sAxtPuwxaIOIOvhwzVDt/kw==}
+ engines: {node: ^18.18.0 || >=20.0.0}
+ peerDependencies:
+ eslint: ^8.56.0
+
'@typescript-eslint/utils@8.1.0':
resolution: {integrity: sha512-ypRueFNKTIFwqPeJBfeIpxZ895PQhNyH4YID6js0UoBImWYoSjBsahUn9KMiJXh94uOjVBgHD9AmkyPsPnFwJA==}
engines: {node: ^18.18.0 || ^20.9.0 || >=21.1.0}
@@ -4277,6 +4297,10 @@ packages:
resolution: {integrity: sha512-JJtkDduxLi9bivAB+cYOVMtbkqdPOhZ+ZI5LC47MIRrDV4Yn2o+ZnW10Nkmr28xRpSpdJ6Sm42Hjf2+REYXm0A==}
engines: {node: ^16.0.0 || >=18.0.0}
+ '@typescript-eslint/visitor-keys@7.18.0':
+ resolution: {integrity: sha512-cDF0/Gf81QpY3xYyJKDV14Zwdmid5+uuENhjH2EqFaF0ni+yAyq/LzMaIJdhNJXZI7uLzwIlA+V7oWoyn6Curg==}
+ engines: {node: ^18.18.0 || >=20.0.0}
+
'@typescript-eslint/visitor-keys@8.1.0':
resolution: {integrity: sha512-ba0lNI19awqZ5ZNKh6wCModMwoZs457StTebQ0q1NP58zSi2F6MOZRXwfKZy+jB78JNJ/WH8GSh2IQNzXX8Nag==}
engines: {node: ^18.18.0 || ^20.9.0 || >=21.1.0}
@@ -4293,12 +4317,30 @@ packages:
'@vitest/expect@1.6.0':
resolution: {integrity: sha512-ixEvFVQjycy/oNgHjqsL6AZCDduC+tflRluaHIzKIsdbzkLn2U/iBnVeJwB6HsIjQBdfMR8Z0tRxKUsvFJEeWQ==}
+ '@vitest/expect@2.0.5':
+ resolution: {integrity: sha512-yHZtwuP7JZivj65Gxoi8upUN2OzHTi3zVfjwdpu2WrvCZPLwsJ2Ey5ILIPccoW23dd/zQBlJ4/dhi7DWNyXCpA==}
+
+ '@vitest/pretty-format@2.0.5':
+ resolution: {integrity: sha512-h8k+1oWHfwTkyTkb9egzwNMfJAEx4veaPSnMeKbVSjp4euqGSbQlm5+6VHwTr7u4FJslVVsUG5nopCaAYdOmSQ==}
+
+ '@vitest/runner@2.0.5':
+ resolution: {integrity: sha512-TfRfZa6Bkk9ky4tW0z20WKXFEwwvWhRY+84CnSEtq4+3ZvDlJyY32oNTJtM7AW9ihW90tX/1Q78cb6FjoAs+ig==}
+
+ '@vitest/snapshot@2.0.5':
+ resolution: {integrity: sha512-SgCPUeDFLaM0mIUHfaArq8fD2WbaXG/zVXjRupthYfYGzc8ztbFbu6dUNOblBG7XLMR1kEhS/DNnfCZ2IhdDew==}
+
'@vitest/spy@1.6.0':
resolution: {integrity: sha512-leUTap6B/cqi/bQkXUu6bQV5TZPx7pmMBKBQiI0rJA8c3pB56ZsaTbREnF7CJfmvAS4V2cXIBAh/3rVwrrCYgw==}
+ '@vitest/spy@2.0.5':
+ resolution: {integrity: sha512-c/jdthAhvJdpfVuaexSrnawxZz6pywlTPe84LUB2m/4t3rl2fTo9NFGBG4oWgaD+FTgDDV8hJ/nibT7IfH3JfA==}
+
'@vitest/utils@1.6.0':
resolution: {integrity: sha512-21cPiuGMoMZwiOHa2i4LXkMkMkCGzA+MVFV70jRwHo95dL4x/ts5GZhML1QWuy7yfp3WzK3lRvZi3JnXTYqrBw==}
+ '@vitest/utils@2.0.5':
+ resolution: {integrity: sha512-d8HKbqIcya+GR67mkZbrzhS5kKhtp8dQLcmRZLGTscGVg7yImT82cIrhtn2L8+VujWcy6KZweApgNmPsTAO/UQ==}
+
'@yarnpkg/fslib@2.10.3':
resolution: {integrity: sha512-41H+Ga78xT9sHvWLlFOZLIhtU6mTGZ20pZ29EiZa97vnxdohJD2AF42rCoAoWfqUz486xY6fhjMH+DYEM9r14A==}
engines: {node: '>=12 <14 || 14.2 - 14.9 || >14.10.0'}
@@ -4506,9 +4548,19 @@ packages:
resolution: {integrity: sha512-bMxMKAjg13EBSVscxTaYA4mRc5t1UAXa2kXiGTNfZ079HIWXEkKmkgFrh/nJqamaLSrXO5H4WFFkPEaLJWbs3A==}
engines: {node: '>= 0.4'}
+ asn1.js@4.10.1:
+ resolution: {integrity: sha512-p32cOF5q0Zqs9uBiONKYLm6BClCoBCM5O9JfeUSlnQLBTxYdTK+pW+nXflm8UkKd2UYlEbYz5qEi0JuZR9ckSw==}
+
+ assert@2.1.0:
+ resolution: {integrity: sha512-eLHpSK/Y4nhMJ07gDaAzoX/XAKS8PSaojml3M0DM4JpV1LAi5JOJ/p6H/XWrl8L+DzVEvVCW1z3vWAaB9oTsQw==}
+
assertion-error@1.1.0:
resolution: {integrity: sha512-jgsaNduz+ndvGyFt3uSuWqvy4lCnIJiovtouQN5JZHOKCS2QuhEdbcQHFhVksz2N2U9hXJo8odG7ETyWlEeuDw==}
+ assertion-error@2.0.1:
+ resolution: {integrity: sha512-Izi8RQcffqCeNVgFigKli1ssklIbpHnCYc6AknXGYoB6grJqyeby7jv12JUQgmTAnIDnbck1uxksT4dzN3PWBA==}
+ engines: {node: '>=12'}
+
ast-types-flow@0.0.8:
resolution: {integrity: sha512-OH/2E5Fg20h2aPrbe+QL8JZQFko0YZaF+j4mnQ7BGhfavO7OpSLa8a0y9sBwomHdSbkhTS8TQNayBfnW5DwbvQ==}
@@ -4647,6 +4699,12 @@ packages:
bl@4.1.0:
resolution: {integrity: sha512-1W07cM9gS6DcLperZfFSj+bWLtaPGSOHWhPiGzXmvVJbRLdG82sH/Kn8EtW1VqWVA54AKf2h5k5BbnIbwF3h6w==}
+ bn.js@4.12.0:
+ resolution: {integrity: sha512-c98Bf3tPniI+scsdk237ku1Dc3ujXQTSgyiPUDEOe7tRkhrqridvh8klBv0HCEso1OLOYcHuCv/cS6DNxKH+ZA==}
+
+ bn.js@5.2.1:
+ resolution: {integrity: sha512-eXRvHzWyYPBuB4NBy0cmYQjGitUrtqwbvlzP3G6VFnNRbsZQIxQ10PbKKHt8gZ/HW/D/747aDl+QkDqg3KQLMQ==}
+
body-parser@1.20.2:
resolution: {integrity: sha512-ml9pReCu3M61kGlqoTm2umSXTlRTuGTx0bfYj+uIUKKYycG5NtSbeetV3faSU6R7ajOPw0g/J1PvK4qNy7s5bA==}
engines: {node: '>= 0.8', npm: 1.2.8000 || >= 1.4.16}
@@ -4664,9 +4722,34 @@ packages:
resolution: {integrity: sha512-yQbXgO/OSZVD2IsiLlro+7Hf6Q18EJrKSEsdoMzKePKXct3gvD8oLcOQdIzGupr5Fj+EDe8gO/lxc1BzfMpxvA==}
engines: {node: '>=8'}
+ brorand@1.1.0:
+ resolution: {integrity: sha512-cKV8tMCEpQs4hK/ik71d6LrPOnpkpGBR0wzxqr68g2m/LB2GxVYQroAjMJZRVM1Y4BCjCKc3vAamxSzOY2RP+w==}
+
browser-assert@1.2.1:
resolution: {integrity: sha512-nfulgvOR6S4gt9UKCeGJOuSGBPGiFT6oQ/2UBnvTY/5aQ1PnksW72fhZkM30DzoRRv2WpwZf1vHHEr3mtuXIWQ==}
+ browser-resolve@2.0.0:
+ resolution: {integrity: sha512-7sWsQlYL2rGLy2IWm8WL8DCTJvYLc/qlOnsakDac87SOoCd16WLsaAMdCiAqsTNHIe+SXfaqyxyo6THoWqs8WQ==}
+
+ browserify-aes@1.2.0:
+ resolution: {integrity: sha512-+7CHXqGuspUn/Sl5aO7Ea0xWGAtETPXNSAjHo48JfLdPWcMng33Xe4znFvQweqc/uzk5zSOI3H52CYnjCfb5hA==}
+
+ browserify-cipher@1.0.1:
+ resolution: {integrity: sha512-sPhkz0ARKbf4rRQt2hTpAHqn47X3llLkUGn+xEJzLjwY8LRs2p0v7ljvI5EyoRO/mexrNunNECisZs+gw2zz1w==}
+
+ browserify-des@1.0.2:
+ resolution: {integrity: sha512-BioO1xf3hFwz4kc6iBhI3ieDFompMhrMlnDFC4/0/vd5MokpuAc3R+LYbwTA9A5Yc9pq9UYPqffKpW2ObuwX5A==}
+
+ browserify-rsa@4.1.0:
+ resolution: {integrity: sha512-AdEER0Hkspgno2aR97SAf6vi0y0k8NuOpGnVH3O99rcA5Q6sh8QxcngtHuJ6uXwnfAXNM4Gn1Gb7/MV1+Ymbog==}
+
+ browserify-sign@4.2.3:
+ resolution: {integrity: sha512-JWCZW6SKhfhjJxO8Tyiiy+XYB7cqd2S5/+WeYHsKdNKFlCBhKbblba1A/HN/90YwtxKc8tCErjffZl++UNmGiw==}
+ engines: {node: '>= 0.12'}
+
+ browserify-zlib@0.2.0:
+ resolution: {integrity: sha512-Z942RysHXmJrhqk88FmKBVq/v5tqmSkDz7p54G/MGyjMnCFFnC79XWNbg+Vta8W6Wb2qtSZTSxIGkJrRpCFEiA==}
+
browserslist@4.23.3:
resolution: {integrity: sha512-btwCFJVjI4YWDNfau8RhZ+B1Q/VLoUITrm3RlP6y1tYGWIOa+InuYiRGXUBXo8nA1qKmHMyLB/iVQg5TT4eFoA==}
engines: {node: ^6 || ^7 || ^8 || ^9 || ^10 || ^11 || ^12 || >=13.7}
@@ -4682,6 +4765,9 @@ packages:
buffer-from@1.1.2:
resolution: {integrity: sha512-E+XQCRwSbaaiChtv6k6Dwgc+bx+Bs6vuKJHHl5kox/BaKbhiXzqQOwK4cO22yElGp2OCmjwVhT3HmxgyPGnJfQ==}
+ buffer-xor@1.0.3:
+ resolution: {integrity: sha512-571s0T7nZWK6vB67HI5dyUF7wXiNcfaPPPTl6zYCNApANjIvYJTg7hlud/+cJpdAhS7dVzqMLmfhfHR3rAcOjQ==}
+
buffer@5.7.1:
resolution: {integrity: sha512-EHcyIPBQ4BSGlvjB16k5KgAJ27CIsHY/2JBmCRReo48y9rQ3MaUzWX3KVlBa4U7MyX02HdVj0K7C3WaB3ju7FQ==}
@@ -4689,6 +4775,9 @@ packages:
resolution: {integrity: sha512-zhaCDicdLuWN5UbN5IMnFqNMhNfo919sH85y2/ea+5Yg9TsTkeZxpL+JLbp6cgYFS4sRLp3YV4S6yDuqVWHYOw==}
engines: {node: '>=6'}
+ builtin-status-codes@3.0.0:
+ resolution: {integrity: sha512-HpGFw18DgFWlncDfjTa2rcQ4W88O1mC8e8yZ2AvQY5KDaktSTwo+KRf6nHK6FRI5FyRyb/5T6+TSxfP7QyGsmQ==}
+
busboy@1.6.0:
resolution: {integrity: sha512-8SFQbg/0hQ9xy3UNTB0YEnsNBbWfhf7RtnzpL7TkBiTBRfrQ9Fxcnz7VJsleJpyp6rVLvXiuORqjlHi5q+PYuA==}
engines: {node: '>=10.16.0'}
@@ -4697,6 +4786,10 @@ packages:
resolution: {integrity: sha512-/Nf7TyzTx6S3yRJObOAV7956r8cr2+Oj8AC5dt8wSP3BQAoeX58NoHyCU8P8zGkNXStjTSi6fzO6F0pBdcYbEg==}
engines: {node: '>= 0.8'}
+ cac@6.7.14:
+ resolution: {integrity: sha512-b6Ilus+c3RrdDk+JhLKUAQfzzgLEPy6wcXqS7f/xe1EETvsDP6GORG7SFuOs6cID5YkqchW/LXZbX5bc8j7ZcQ==}
+ engines: {node: '>=8'}
+
caching-transform@4.0.0:
resolution: {integrity: sha512-kpqOvwXnjjN44D89K5ccQC+RUrsy7jB/XLlRrx0D7/2HNcTPqzsb6XgYoErwko6QsV184CA2YgS1fxDiiDZMWA==}
engines: {node: '>=8'}
@@ -4750,6 +4843,10 @@ packages:
resolution: {integrity: sha512-RITGBfijLkBddZvnn8jdqoTypxvqbOLYQkGGxXzeFjVHvudaPw0HNFD9x928/eUwYWd2dPCugVqspGALTZZQKw==}
engines: {node: '>=4'}
+ chai@5.1.1:
+ resolution: {integrity: sha512-pT1ZgP8rPNqUgieVaEY+ryQr6Q4HXNg8Ei9UnLUrjN4IA7dvQC5JB+/kxVcPNDHyBcc/26CXPkbNzq3qwrOEKA==}
+ engines: {node: '>=12'}
+
chalk@1.1.3:
resolution: {integrity: sha512-U3lRVLMSlsCfjqYPbLyVv11M9CPW4I728d6TCKMAOJueEeB9/8o+eSsMnxPJD+Q+K909sdESg7C+tIkoH6on1A==}
engines: {node: '>=0.10.0'}
@@ -4808,6 +4905,10 @@ packages:
check-error@1.0.3:
resolution: {integrity: sha512-iKEoDYaRmd1mxM90a2OEfWhjsjPpYPuQ+lMYsoxB126+t8fw7ySEO48nmDg5COTjxDI65/Y2OWpeEHk3ZOe8zg==}
+ check-error@2.1.1:
+ resolution: {integrity: sha512-OAlb+T7V4Op9OwdkjmguYRqncdlx5JiofwOAUkmTF+jNdHwzTaTs4sRAGpzLF3oOz5xAyDGrPgeIDFQmDOTiJw==}
+ engines: {node: '>= 16'}
+
chokidar@3.6.0:
resolution: {integrity: sha512-7VT13fmjotKpGipCW9JEQAusEPE+Ei8nl6/g4FBAmIm0GOOLMua9NDDo/DWp0ZAxCr3cPq5ZpBqmPAQgDda2Pw==}
engines: {node: '>= 8.10.0'}
@@ -4852,6 +4953,9 @@ packages:
resolution: {integrity: sha512-TdHqgGf9odd8SXNuxtUBVx8Nv+qZOejE6qyqiy5NtbYYQOeFa6zmHkxlPzmaLxWWHsU6nJmB7AETdVPi+2NBUg==}
engines: {node: '>=8'}
+ cipher-base@1.0.4:
+ resolution: {integrity: sha512-Kkht5ye6ZGmwv40uUDZztayT2ThLQGfnj/T71N/XzeZeo3nf8foyW7zGTsPYkEya3m5f3cAypH+qe7YOrM1U2Q==}
+
citty@0.1.6:
resolution: {integrity: sha512-tskPPKEs8D2KPafUypv2gxwJP8h/OaJmC82QQGGDQcHvXX43xF2VDACcJVmZ0EuSxkpO9Kc4MlrA3q0+FG58AQ==}
@@ -5012,9 +5116,15 @@ packages:
resolution: {integrity: sha512-I5qxpzLv+sJhTVEoLYNcTW+bThDCPsit0vLNKShZx6rLtpilNpmmeTPaeqJb9ZE9dV3DGaeby6Vuhrw38WjeyQ==}
engines: {node: ^14.18.0 || >=16.10.0}
+ console-browserify@1.2.0:
+ resolution: {integrity: sha512-ZMkYO/LkF17QvCPqM0gxw8yUzigAOZOSWSHg91FH6orS7vcEj5dVZTidN2fQ14yBSdg97RqhSNwLUXInd52OTA==}
+
constant-case@3.0.4:
resolution: {integrity: sha512-I2hSBi7Vvs7BEuJDr5dDHfzb/Ruj3FyvFyh7KLilAjNQw3Be+xgqUBA2W6scVEcL0hL1dwPRtIqEPVUCKkSsyQ==}
+ constants-browserify@1.0.0:
+ resolution: {integrity: sha512-xFxOwqIzR/e1k1gLiWEophSCMqXcwVHIH7akf7b/vxcUeGunlj3hvZaaqxwHsTgn+IndtkQJgSztIDWeumWJDQ==}
+
content-disposition@0.5.4:
resolution: {integrity: sha512-FveZTNuGw04cxlAiWbzi6zTAL/lhehaWbTtgluJh4/E95DqMwTmha3KZN1aAWA8cFIhHzMZUvLevkw5Rqk+tSQ==}
engines: {node: '>= 0.6'}
@@ -5046,6 +5156,9 @@ packages:
core-js-compat@3.38.1:
resolution: {integrity: sha512-JRH6gfXxGmrzF3tZ57lFx97YARxCXPaMzPo6jELZhv88pBH5VXpQ+y0znKGlFnzuaihqhLbefxSJxWJMPtfDzw==}
+ core-util-is@1.0.3:
+ resolution: {integrity: sha512-ZQBvi1DcpJ4GDqanjucZ2Hj3wEO5pZDS89BWbkcrvdxksJorwUDDZamX9ldFkp9aw2lmBDLgkObEA4DWNJ9FYQ==}
+
cosmiconfig@7.1.0:
resolution: {integrity: sha512-AdmX6xUzdNASswsFtmwSt7Vj8po9IuqXm0UXz7QKPuEUmPB4XyjGfaAr2PSuELMwkRMVH1EpIkX5bTZGRB3eCA==}
engines: {node: '>=10'}
@@ -5059,6 +5172,15 @@ packages:
typescript:
optional: true
+ create-ecdh@4.0.4:
+ resolution: {integrity: sha512-mf+TCx8wWc9VpuxfP2ht0iSISLZnt0JgWlrOKZiNqyUZWnjIaCIVNQArMHnCZKfEYRg6IM7A+NeJoN8gf/Ws0A==}
+
+ create-hash@1.2.0:
+ resolution: {integrity: sha512-z00bCGNHDG8mHAkP7CtT1qVu+bFQUPjYq/4Iv3C3kWjTFV10zIjfSoeqXo9Asws8gwSHDGj/hl2u4OGIjapeCg==}
+
+ create-hmac@1.1.7:
+ resolution: {integrity: sha512-MJG9liiZ+ogc4TzUwuvbER1JRdgvUFSB5+VR/g5h82fGaIRWMWddtKBHi7/sVhfjQZ6SehlyhvQYrcYkaUIpLg==}
+
create-jest@29.7.0:
resolution: {integrity: sha512-Adz2bdH0Vq3F53KEMJOoftQFutWCukm6J24wbPWRO4k1kMY7gS7ds/uoJkNuV8wDCtWWnuwGcJwpWcih+zEW1Q==}
engines: {node: ^14.15.0 || ^16.10.0 || >=18.0.0}
@@ -5080,6 +5202,9 @@ packages:
resolution: {integrity: sha512-iRDPJKUPVEND7dHPO8rkbOnPpyDygcDFtWjpeWNCgy8WP2rXcxXL8TskReQl6OrB2G7+UJrags1q15Fudc7G6w==}
engines: {node: '>= 8'}
+ crypto-browserify@3.12.0:
+ resolution: {integrity: sha512-fz4spIh+znjO2VjL+IdhEpRJ3YN6sMzITSBijk6FK2UvTqruSQW+/cCZTSNsMiZNvUeq0CqurF+dAbyiGOY6Wg==}
+
crypto-random-string@4.0.0:
resolution: {integrity: sha512-x8dy3RnvYdlUcPOjkEHqozhiwzKNSq7GcPuXFbnyMOCHxX8V3OgIg/pYuabl2sbUPfIJaeAQB7PMOK8DFIdoRA==}
engines: {node: '>=12'}
@@ -5163,9 +5288,6 @@ packages:
engines: {node: '>=4'}
hasBin: true
- cssfontparser@1.2.1:
- resolution: {integrity: sha512-6tun4LoZnj7VN6YeegOVb67KBX/7JJsqvj+pv3ZA7F878/eN33AbGa5b/S/wXxS/tcp8nc40xRUrsPlxIyNUPg==}
-
cssnano-preset-default@5.2.14:
resolution: {integrity: sha512-t0SFesj/ZV2OTylqQVOrFgEh5uanxbO6ZAdeCrNsUQ6fVuXwYTxJPNAGvGTxHbD68ldIJNec7PyYZDBrfDQ+6A==}
engines: {node: ^10 || ^12 || >=14.0}
@@ -5297,6 +5419,10 @@ packages:
resolution: {integrity: sha512-SUwdGfqdKOwxCPeVYjwSyRpJ7Z+fhpwIAtmCUdZIWZ/YP5R9WAsyuSgpLVDi9bjWoN2LXHNss/dk3urXtdQxGg==}
engines: {node: '>=6'}
+ deep-eql@5.0.2:
+ resolution: {integrity: sha512-h5k/5U50IJJFpzfL6nO9jaaumfjO/f2NjK/oYB2Djzm4p9L+3T9qWpZqZ2hAbLPuuYq9wrU08WQyBTL5GbPk5Q==}
+ engines: {node: '>=6'}
+
deep-equal@2.2.3:
resolution: {integrity: sha512-ZIwpnevOurS8bpT4192sqAowWM76JDKSHYzMLty3BZGSswgq6pBaH3DhCSW5xVAZICZyKdOBPjwww5wfgT/6PA==}
engines: {node: '>= 0.4'}
@@ -5350,6 +5476,9 @@ packages:
resolution: {integrity: sha512-0je+qPKHEMohvfRTCEo3CrPG6cAzAYgmzKyxRiYSSDkS6eGJdyVJm7WaYA5ECaAD9wLB2T4EEeymA5aFVcYXCA==}
engines: {node: '>=6'}
+ des.js@1.1.0:
+ resolution: {integrity: sha512-r17GxjhUCjSRy8aiJpr8/UadFIzMzJGexI3Nmz4ADi9LYSFx4gTBp80+NaX/YsXWWLhpZ7v/v/ubEc/bCNfKwg==}
+
destroy@1.2.0:
resolution: {integrity: sha512-2sJGJTaXIIaR1w4iJSNoN0hnMY7Gpc/n8D4qSCJw8QqFWXf7cuAgnEHxBpweaVcPevC2l3KpjYCx3NypQQgaJg==}
engines: {node: '>= 0.8', npm: 1.2.8000 || >= 1.4.16}
@@ -5390,6 +5519,9 @@ packages:
diffable-html@4.1.0:
resolution: {integrity: sha512-++kyNek+YBLH8cLXS+iTj/Hiy2s5qkRJEJ8kgu/WHbFrVY2vz9xPFUT+fii2zGF0m1CaojDlQJjkfrCt7YWM1g==}
+ diffie-hellman@5.0.3:
+ resolution: {integrity: sha512-kqag/Nl+f3GwyK25fhUMYj81BUOrZ9IuJsjIcDE5icNM9FJHAVm3VcUDxdLPoQtTuUylWm6ZIknYJwwaPxsUzg==}
+
dir-glob@3.0.1:
resolution: {integrity: sha512-WkrWp9GR4KXfKGYzOLmTuGVi1UWFfws377n9cc55/tb6DuqyF6pcQ5AbiHEshaDpY9v6oaSr2XCDidGmMwdzIA==}
engines: {node: '>=8'}
@@ -5423,6 +5555,10 @@ packages:
dom-serializer@2.0.0:
resolution: {integrity: sha512-wIkAryiqt/nV5EQKqQpo3SToSOV9J0DnbJqwK7Wv/Trc92zIAYZ4FlMu+JPFW1DfGFt81ZTCGgDEabffXeLyJg==}
+ domain-browser@4.23.0:
+ resolution: {integrity: sha512-ArzcM/II1wCCujdCNyQjXrAFwS4mrLh4C7DZWlaI8mdh7h3BfKdNd3bKXITfl2PT9FtfQqaGvhi1vPRQPimjGA==}
+ engines: {node: '>=10'}
+
domelementtype@1.3.1:
resolution: {integrity: sha512-BSKB+TSpMpFI/HOxCNr1O8aMOTZ8hT3pM3GQ0w/mWRmkhEDSFJkkyzz4XQsBV44BChwGkrDfMyjVD0eA2aFV3w==}
@@ -5475,6 +5611,9 @@ packages:
electron-to-chromium@1.5.6:
resolution: {integrity: sha512-jwXWsM5RPf6j9dPYzaorcBSUg6AiqocPEyMpkchkvntaH9HGfOOMZwxMJjDY/XEs3T5dM7uyH1VhRMkqUU9qVw==}
+ elliptic@6.5.7:
+ resolution: {integrity: sha512-ESVCtTwiA+XhY3wyh24QqRGBoP3rEdDUl3EDUUo9tft074fi19IrdpH7hLCMMP3CIj7jb3W96rn8lt/BqIlt5Q==}
+
emittery@0.13.1:
resolution: {integrity: sha512-DeWwawk6r5yR9jFgnDKYt4sLS0LmHJJi3ZOnb5/JdbYwj3nW+FxQnHIjhBKz8YLC7oRNPVM9NQ47I3CVx34eqQ==}
engines: {node: '>=12'}
@@ -5673,19 +5812,6 @@ packages:
'@typescript-eslint/parser':
optional: true
- eslint-plugin-jest@27.9.0:
- resolution: {integrity: sha512-QIT7FH7fNmd9n4se7FFKHbsLKGQiw885Ds6Y/sxKgCZ6natwCsXdgPOADnYVxN2QrRweF0FZWbJ6S7Rsn7llug==}
- engines: {node: ^14.15.0 || ^16.10.0 || >=18.0.0}
- peerDependencies:
- '@typescript-eslint/eslint-plugin': ^5.0.0 || ^6.0.0 || ^7.0.0
- eslint: ^7.0.0 || ^8.0.0
- jest: '*'
- peerDependenciesMeta:
- '@typescript-eslint/eslint-plugin':
- optional: true
- jest:
- optional: true
-
eslint-plugin-jsx-a11y@6.9.0:
resolution: {integrity: sha512-nOFOCaJG2pYqORjK19lqPqxMO/JpvdCZdPtNdxY3kvom3jTvkAbOvQvD8wuD0G8BYR0IGAGYDlzqWJOh/ybn2g==}
engines: {node: '>=4.0'}
@@ -5726,6 +5852,19 @@ packages:
peerDependencies:
eslint: '>=6'
+ eslint-plugin-vitest@0.5.4:
+ resolution: {integrity: sha512-um+odCkccAHU53WdKAw39MY61+1x990uXjSPguUCq3VcEHdqJrOb8OTMrbYlY6f9jAKx7x98kLVlIe3RJeJqoQ==}
+ engines: {node: ^18.0.0 || >= 20.0.0}
+ peerDependencies:
+ '@typescript-eslint/eslint-plugin': '*'
+ eslint: ^8.57.0 || ^9.0.0
+ vitest: '*'
+ peerDependenciesMeta:
+ '@typescript-eslint/eslint-plugin':
+ optional: true
+ vitest:
+ optional: true
+
eslint-scope@5.1.1:
resolution: {integrity: sha512-2NxwbF/hZ0KpepYN0cNbo+FN6XoK7GaHlQhgx/hIZl6Va0bF45RQOOwhLIy8lQDbuCiadSLCBnH2CFYquit5bw==}
engines: {node: '>=8.0.0'}
@@ -5816,6 +5955,13 @@ packages:
eventemitter3@4.0.7:
resolution: {integrity: sha512-8guHBZCwKnFhYdHr2ysuRWErTwhoN2X8XELRlrRwpmfeY2jjuUN4taQMsULKUVo1K4DvZl+0pgfyoysHxvmvEw==}
+ events@3.3.0:
+ resolution: {integrity: sha512-mQw+2fkQbALzQ7V0MY0IqdnXNOeTtP4r0lN9z7AAawCXgqea7bDii20AYrIBrFd/Hx0M2Ocz6S111CaFkUcb0Q==}
+ engines: {node: '>=0.8.x'}
+
+ evp_bytestokey@1.0.3:
+ resolution: {integrity: sha512-/f2Go4TognH/KvCISP7OUsHn85hT9nUkxxA9BEWxFn+Oj9o8ZNLm/40hdlgSLyuOimsrTKLUMEorQexp/aPQeA==}
+
execa@5.1.1:
resolution: {integrity: sha512-8uSpZZocAZRBAPIEINJj3Lo9HyGitllczc27Eh5YYojjMFMn8yHMDMaUHE2Jqfq05D/wucwI4JGURyXt1vchyg==}
engines: {node: '>=10'}
@@ -6295,6 +6441,17 @@ packages:
resolution: {integrity: sha512-NqADB8VjPFLM2V0VvHUewwwsw0ZWBaIdgo+ieHtK3hasLz4qeCRjYcqfB6AQrBggRKppKF8L52/VqdVsO47Dlw==}
engines: {node: '>= 0.4'}
+ hash-base@3.0.4:
+ resolution: {integrity: sha512-EeeoJKjTyt868liAlVmcv2ZsUfGHlE3Q+BICOXcZiwN3osr5Q/zFGYmTJpoIzuaSTAwndFy+GqhEwlU4L3j4Ow==}
+ engines: {node: '>=4'}
+
+ hash-base@3.1.0:
+ resolution: {integrity: sha512-1nmYp/rhMDiE7AYkDw+lLwlAzz0AntGIe51F3RfFfEqyQ3feY2eI/NcwC6umIQVOASPMsWJLJScWKSSvzL9IVA==}
+ engines: {node: '>=4'}
+
+ hash.js@1.1.7:
+ resolution: {integrity: sha512-taOaskGt4z4SOANNseOviYDvjEJinIkRgmp7LbKP2YTTmVxWBl87s/uzK9r+44BclBSp2X7K1hqeNfz9JbBeXA==}
+
hasha@5.2.2:
resolution: {integrity: sha512-Hrp5vIK/xr5SkeN2onO32H0MgNZ0f17HRNH39WfL0SYUNOTZ5Lz1TJ8Pajo/87dYGEFlLMm7mIc/k/s6Bvz9HQ==}
engines: {node: '>=8'}
@@ -6328,6 +6485,9 @@ packages:
resolution: {integrity: sha512-SYVnVFswQER+zu1laSya563s+F8VDGt7o35d4utbamowvUNLLMovFqwCLSocpZTz3MgaSRA1IbqRWZv97dtErQ==}
engines: {node: '>=12.0.0'}
+ hmac-drbg@1.0.1:
+ resolution: {integrity: sha512-Tti3gMqLdZfhOQY1Mzf/AanLiqh1WTiJgEj26ZuYQ9fbkLomzGchCws4FyrSd4VkpBfiNhaE1On+lOz894jvXg==}
+
hoist-non-react-statics@3.3.2:
resolution: {integrity: sha512-/gGivxi8JPKWNm/W0jSmzcMPpfpPLc3dY/6GxhX2hQ9iGj3aDfklV4ET7NjKpSinLpJ5vafa9iiGIEZg10SfBw==}
@@ -6361,6 +6521,9 @@ packages:
resolution: {integrity: sha512-n2hY8YdoRE1i7r6M0w9DIw5GgZN0G25P8zLCRQ8rjXtTU3vsNFBI/vWK/UIeE6g5MUUz6avwAPXmL6Fy9D/90w==}
engines: {node: '>= 6'}
+ https-browserify@1.0.0:
+ resolution: {integrity: sha512-J+FkSdyD+0mA0N+81tMotaRMfSL9SGi+xpD3T6YApKsc3bGSXJlfXri3VyFOeYkfLRQisDk1W+jIFFKBeUBbBg==}
+
https-proxy-agent@5.0.1:
resolution: {integrity: sha512-dFcAjpTQFgoLMzC2VwU+C/CbS7uRL0lWmxDITmqm7C+7F0Odmj6s9l6alZc6AELXhrnggM2CeWSXHGOdX2YtwA==}
engines: {node: '>= 6'}
@@ -6620,6 +6783,10 @@ packages:
is-module@1.0.0:
resolution: {integrity: sha512-51ypPSPCoTEIN9dy5Oy+h4pShgJmPCygKfyRCISBI+JoWT/2oJvK8QPxmwv7b/p239jXrm9M1mlQbyKJ5A152g==}
+ is-nan@1.3.2:
+ resolution: {integrity: sha512-E+zBKpQ2t6MEo1VsonYmluk9NxGrbzpeeLC2xIViuO2EjU2xsXsBPwTr3Ykv9l08UYEVEdWeRZNouaZqF6RN0w==}
+ engines: {node: '>= 0.4'}
+
is-negative-zero@2.0.3:
resolution: {integrity: sha512-5KoIu2Ngpyek75jXodFvnafB6DJgr3u8uuK0LEZJjrU19DrMD3EVERaR8sjz8CCGgpZvxPl9SuE1GMVPFHx1mw==}
engines: {node: '>= 0.4'}
@@ -6746,6 +6913,9 @@ packages:
resolution: {integrity: sha512-eXK1UInq2bPmjyX6e3VHIzMLobc4J94i4AWn+Hpq3OU5KkrRC96OAcR3PRJ/pGu6m8TRnBHP9dkXQVsT/COVIA==}
engines: {node: '>=0.10.0'}
+ isarray@1.0.0:
+ resolution: {integrity: sha512-VLghIWNM6ELQzo7zwmcg0NmTVyWKYjvIeM83yjp0wRDTmUnrM678fQbcKBo6n2CJEF0szoG//ytg+TKla89ALQ==}
+
isarray@2.0.5:
resolution: {integrity: sha512-xHjhDr3cNBK0BzdUJSPXZntQUx/mwMS5Rw4A7lPJ90XGAO6ISP/ePDNuo0vhqOZU+UD5JoodwCAAoZQd3FeAKw==}
@@ -6767,6 +6937,10 @@ packages:
isomorphic-resolve@1.0.0:
resolution: {integrity: sha512-FWn6176keSYAapzv5P6ZzLdbCXj5uaG49h1y+EXRNqZm2RBztzBOYqCMmSe4Dmo+bIvk7sX/SN4pI/3QmfH3aw==}
+ isomorphic-timers-promises@1.0.1:
+ resolution: {integrity: sha512-u4sej9B1LPSxTGKB/HiuzvEQnXH0ECYkSVQU39koSwmFAxhlEAFl9RdTvLv4TOTQUgBS5O3O5fwUxk6byBZ+IQ==}
+ engines: {node: '>=10'}
+
istanbul-lib-coverage@3.2.2:
resolution: {integrity: sha512-O8dpsF+r0WV/8MNRKfnmrtCWhuKjxrq2w+jpzBL5UZKTi2LeVWnWOmWRxFlesJONmc+wLAGvKQZEOanko0LFTg==}
engines: {node: '>=8'}
@@ -6822,9 +6996,6 @@ packages:
resolution: {integrity: sha512-Xt7O0+wIpW31lv0SO1wQZUTyJE7DEmnDEZeTt9/S9L5WUywxrv8BrgvTuQEqujtfaQOcJ70p4wg7UUgK1E2F5g==}
engines: {node: '>= 16.0.0'}
- jest-canvas-mock@2.5.2:
- resolution: {integrity: sha512-vgnpPupjOL6+L5oJXzxTxFrlGEIbHdZqFU+LFNdtLxZ3lRDCl17FlTMM7IatoRQkrcyOTMlDinjUguqmQ6bR2A==}
-
jest-changed-files@29.7.0:
resolution: {integrity: sha512-fEArFiwf1BpQ+4bXSprcDc3/x4HSzL4al2tozwVpDFpsxALjLYdyiIK4e5Vz66GQJIbXJ82+35PtysofptNX2w==}
engines: {node: ^14.15.0 || ^16.10.0 || >=18.0.0}
@@ -6867,15 +7038,6 @@ packages:
resolution: {integrity: sha512-gns+Er14+ZrEoC5fhOfYCY1LOHHr0TI+rQUHZS8Ttw2l7gl+80eHc/gFf2Ktkw0+SIACDTeWvpFcv3B04VembQ==}
engines: {node: ^14.15.0 || ^16.10.0 || >=18.0.0}
- jest-environment-jsdom@29.7.0:
- resolution: {integrity: sha512-k9iQbsf9OyOfdzWH8HDmrRT0gSIcX+FLNW7IQq94tFX0gynPwqDTW0Ho6iMVNjGz/nb+l/vW3dWM2bbLLpkbXA==}
- engines: {node: ^14.15.0 || ^16.10.0 || >=18.0.0}
- peerDependencies:
- canvas: ^2.5.0
- peerDependenciesMeta:
- canvas:
- optional: true
-
jest-environment-node@29.7.0:
resolution: {integrity: sha512-DOSwCRqXirTOyheM+4d5YZOrWcdu0LNZ87ewUoywbcb2XR4wKgqiG8vNeYwhjFMbEkfju7wx2GYH0P2gevGvFw==}
engines: {node: ^14.15.0 || ^16.10.0 || >=18.0.0}
@@ -6959,9 +7121,6 @@ packages:
resolution: {integrity: sha512-Rm0BMWtxBcioHr1/OX5YCP8Uov4riHvKPknOGs804Zg9JGZgmIBkbtlxJC/7Z4msKYVbIJtfU+tKb8xlYNfdkw==}
engines: {node: ^14.15.0 || ^16.10.0 || >=18.0.0}
- jest-static-stubs@0.0.1:
- resolution: {integrity: sha512-ku5H+OQbiNxOHWIcua1sCdcJH3xUxmHyFBZCtk/uHFsZsczIpFD/nDdsTtlPlf/oIuh0ni3IRnsebcDjv9BVww==}
-
jest-util@29.7.0:
resolution: {integrity: sha512-z6EbKajIpqGKU56y5KBUgy1dt1ihhQJgWzUlZHArA/+X2ad7Cb5iF+AK1EWVL/Bo7Rz9uurpqw6SiBCefUbCGA==}
engines: {node: ^14.15.0 || ^16.10.0 || >=18.0.0}
@@ -7221,6 +7380,9 @@ packages:
resolution: {integrity: sha512-iPZK6eYjbxRu3uB4/WZ3EsEIMJFMqAoopl3R+zuq0UjcAm/MO6KCweDgPfP3elTztoKP3KtnVHxTn2NHBSDVUw==}
engines: {node: '>=10'}
+ lodash-es@4.17.21:
+ resolution: {integrity: sha512-mKnC+QJ9pWVzv+C4/U3rRsHapFfHvQFoFB92e52xeyGMcX6/OlIl78je1u8vePzYZSkkogMPJ2yjxxsb89cxyw==}
+
lodash.camelcase@4.3.0:
resolution: {integrity: sha512-TwuEnCnxbc3rAvhf/LbG7tJUDzhqXyFnv3dtzLOPgCG/hODL7WFnsbwktkD7yUV0RrreP/l1PALq/YSg6VvjlA==}
@@ -7285,6 +7447,9 @@ packages:
loupe@2.3.7:
resolution: {integrity: sha512-zSMINGVYkdpYSOBmLi0D1Uo7JU9nVdQKrHxC8eYlV+9YKK9WePqAlL7lSlorG/U2Fw1w0hTBmaa/jrQ3UbPHtA==}
+ loupe@3.1.1:
+ resolution: {integrity: sha512-edNu/8D5MKVfGVFRhFf8aAxiTM6Wumfz5XsaatSxlD3w4R1d/WEKUTydCdPGbl9K7QG/Ca3GnDV2sIKIpXRQcw==}
+
lower-case@2.0.2:
resolution: {integrity: sha512-7fm3l3NAF9WfN6W3JOmf5drwpVqX78JtoGJ3A6W0a6ZnldM41w2fV5D490psKFTpMds8TJse/eHLFFsNHHjHgg==}
@@ -7353,6 +7518,9 @@ packages:
mathml-tag-names@2.1.3:
resolution: {integrity: sha512-APMBEanjybaPzUrfqU0IMU5I0AswKMH7k8OTLs0vvV4KZpExkTkY87nR/zpbuTPj+gARop7aGUbl11pnDfW6xg==}
+ md5.js@1.3.5:
+ resolution: {integrity: sha512-xitP+WxNPcTTOgnTJcrhM0xvdPepipPSf3I8EIpGKeFLjt3PlJLIDG3u8EX53ZIubkb+5U2+3rELYpEhHhzdkg==}
+
mdast-util-from-markdown@0.8.5:
resolution: {integrity: sha512-2hkTXtYYnr+NubD/g6KGBS/0mFmBcifAsI0yIWRiRo0PjVs6SSOSOdtzbp6kSGnShDN6G5aWZpKQ2lWRy27mWQ==}
@@ -7515,6 +7683,10 @@ packages:
resolution: {integrity: sha512-LPP/3KorzCwBxfeUuZmaR6bG2kdeHSbe0P2tY3FLRU4vYrjYz5hI4QZwV0njUx3jeuKe67YukQ1LSPZBKDqO/Q==}
engines: {node: '>=8.6'}
+ miller-rabin@4.0.1:
+ resolution: {integrity: sha512-115fLhvZVqWwHPbClyntxEVfVDfl9DLLTuJvq3g2O/Oxi8AiNouAHvDSzHS0viUJc+V5vm3eq91Xwqn9dp4jRA==}
+ hasBin: true
+
mime-db@1.52.0:
resolution: {integrity: sha512-sPU4uV7dYlvtWJxwwxHD0PuihVNiE7TyAbQ5SWxDCB9mUYvOgroQOwYQQOKPJ8CIbE+1ETVlOoK1UC2nU3gYvg==}
engines: {node: '>= 0.6'}
@@ -7540,6 +7712,12 @@ packages:
resolution: {integrity: sha512-I9jwMn07Sy/IwOj3zVkVik2JTvgpaykDZEigL6Rx6N9LbMywwUSMtxET+7lVoDLLd3O3IXwJwvuuns8UB/HeAg==}
engines: {node: '>=4'}
+ minimalistic-assert@1.0.1:
+ resolution: {integrity: sha512-UtJcAD4yEaGtjPezWuO9wC4nwUnVH/8/Im3yEHQP4b67cXlD/Qr9hdITCU1xDbSEXg2XKNaP8jsReV7vQd00/A==}
+
+ minimalistic-crypto-utils@1.0.1:
+ resolution: {integrity: sha512-JIYlbt6g8i5jKfJ3xz7rF0LXmv2TkDxBLUkiBeZ7bAx4GnnNMr8xFpGnOxn6GhTEHx3SjRrZEoU+j04prX1ktg==}
+
minimatch@10.0.1:
resolution: {integrity: sha512-ethXTt3SGGR+95gudmqJ1eNhRO7eGEGIgYA9vnPatK4/etz2MEVDno5GMCibdMTuBMyElzIlgxMna3K94XDIDQ==}
engines: {node: 20 || >=22}
@@ -7595,9 +7773,6 @@ packages:
mlly@1.7.1:
resolution: {integrity: sha512-rrVRZRELyQzrIUAVMHxP97kv+G786pHmOKzuFII8zDYahFBS7qnHh2AlYSl1GAHhaMPCz6/oHjVMcfFYgFYHgA==}
- moo-color@1.0.3:
- resolution: {integrity: sha512-i/+ZKXMDf6aqYtBhuOcej71YSlbjT3wCO/4H1j8rPvxDJEifdwgg5MaFyu6iYAT8GBZJg2z0dkgK4YMzvURALQ==}
-
mri@1.2.0:
resolution: {integrity: sha512-tzzskb3bG8LvYGFF/mDTpq3jpI6Q9wc3LEmBaghu+DdCssd1FakN7Bc0hVNmEyGq1bq3RgfkCb3cmQLpNPOroA==}
engines: {node: '>=4'}
@@ -7726,6 +7901,10 @@ packages:
node-releases@2.0.18:
resolution: {integrity: sha512-d9VeXT4SJ7ZeOqGX6R5EM022wpL+eWPooLI+5UpWn2jCT1aosUQEhQP214x33Wkwx3JQMvIm+tIoVOdodFS40g==}
+ node-stdlib-browser@1.2.0:
+ resolution: {integrity: sha512-VSjFxUhRhkyed8AtLwSCkMrJRfQ3e2lGtG3sP6FEgaLKBBbxM/dLfjRe1+iLhjvyLFW3tBQ8+c0pcOtXGbAZJg==}
+ engines: {node: '>=10'}
+
nopt@7.2.1:
resolution: {integrity: sha512-taM24ViiimT/XntxbPyJQzCG+p4EKOpgD3mxFwW38mGjVUrfERQOeY4EDHjdnptttfHuHQXFx+lTP08Q+mLa/w==}
engines: {node: ^14.17.0 || ^16.13.0 || >=18.0.0}
@@ -7896,6 +8075,9 @@ packages:
orderedmap@2.1.1:
resolution: {integrity: sha512-TvAWxi0nDe1j/rtMcWcIj94+Ffe6n7zhow33h40SKxmsmozs6dz/e+EajymfoFcHd7sxNn8yHM8839uixMOV6g==}
+ os-browserify@0.3.0:
+ resolution: {integrity: sha512-gjcpUc3clBf9+210TRaDWbf+rZZZEshZ+DlXMRCeAjp0xhTrnQsKHypIy1J3d5hKdUzj69t708EHtU8P6bUn0A==}
+
os-homedir@1.0.2:
resolution: {integrity: sha512-B5JU3cabzk8c67mRRd3ECmROafjYMXbuzlwtqdM8IbS8ktlTix8aFGb2bAGKrSRIlnfKwovGUUr72JUPyOb6kQ==}
engines: {node: '>=0.10.0'}
@@ -7983,6 +8165,9 @@ packages:
package-json-from-dist@1.0.0:
resolution: {integrity: sha512-dATvCeZN/8wQsGywez1mzHtTlP22H8OEfPrVMLNr4/eGa+ijtLn/6M5f0dY8UKNrC2O9UCU6SSoG3qRKnt7STw==}
+ pako@1.0.11:
+ resolution: {integrity: sha512-4hLB8Py4zZce5s4yd9XzopqwVv/yGNhV1Bl8NTmCq1763HeK2+EwVTv+leGeL13Dnh2wfbqowVPXCIO0z4taYw==}
+
param-case@3.0.4:
resolution: {integrity: sha512-RXlj7zCYokReqWpOPH9oYivUzLYZ5vAPIfEmCTNViosC78F8F0H9y7T7gG2M39ymgutxF5gcFEsyZQSph9Bp3A==}
@@ -7990,6 +8175,10 @@ packages:
resolution: {integrity: sha512-GQ2EWRpQV8/o+Aw8YqtfZZPfNRWZYkbidE9k5rpl/hC3vtHHBfGm2Ifi6qWV+coDGkrUKZAxE3Lot5kcsRlh+g==}
engines: {node: '>=6'}
+ parse-asn1@5.1.7:
+ resolution: {integrity: sha512-CTM5kuWR3sx9IFamcl5ErfPl6ea/N8IYwiJ+vpeB2g+1iknv7zBl5uPwbMbRVznRVbrNY6lGuDoE5b30grmbqg==}
+ engines: {node: '>= 0.10'}
+
parse-entities@2.0.0:
resolution: {integrity: sha512-kkywGpCcRYhqQIchaWqZ875wzpS/bMKhz5HnN3p7wveJTkTtyAB/AlnS0f8DFSqYW1T82t6yEAkEcB+A1I3MbQ==}
@@ -8026,6 +8215,9 @@ packages:
pascal-case@3.1.2:
resolution: {integrity: sha512-uWlGT3YSnK9x3BQJaOdcZwrnV6hPpd8jFH1/ucpiLRPh/2zCVJKS19E4GvYHvaCcACn3foXZ0cLB9Wrx1KGe5g==}
+ path-browserify@1.0.1:
+ resolution: {integrity: sha512-b7uo2UCUOYZcnF/3ID0lulOJi/bafxa1xPe7ZPsammBSpjSWQkjNxlt635YGS2MiR9GjvuXCtz2emr3jbsz98g==}
+
path-case@3.0.4:
resolution: {integrity: sha512-qO4qCFjXqVTrcbPt/hQfhTQ+VhFsqNKOPtytgNKkKxSoEp3XPUQ8ObFuePylOIok5gjn69ry8XiULxCwot3Wfg==}
@@ -8091,6 +8283,14 @@ packages:
pathval@1.1.1:
resolution: {integrity: sha512-Dp6zGqpTdETdR63lehJYPeIOqpiNBNtc7BpWSLrOje7UaIsE5aY92r/AunQA7rsXvet3lrJ3JnZX29UPTKXyKQ==}
+ pathval@2.0.0:
+ resolution: {integrity: sha512-vE7JKRyES09KiunauX7nd2Q9/L7lhok4smP9RZTDeD4MVs72Dp2qNFVz39Nz5a0FVEW0BJR6C0DYrq6unoziZA==}
+ engines: {node: '>= 14.16'}
+
+ pbkdf2@3.1.2:
+ resolution: {integrity: sha512-iuh7L6jA7JEGu2WxDwtQP1ddOpaJNC4KlDEFfdQajSGgGPNi4OyDc2R7QnbY2bR9QjBVGwgvTdNJZoE7RaxUMA==}
+ engines: {node: '>=0.12'}
+
picocolors@1.0.1:
resolution: {integrity: sha512-anP1Z8qwhkbmu7MFP5iTt+wQKXgwzf7zTyGlcdzabySa9vd0Xt392U0rVmz9poOaBj0uHJKyyo9/upk0HrEQew==}
@@ -8126,6 +8326,10 @@ packages:
resolution: {integrity: sha512-HRDzbaKjC+AOWVXxAU/x54COGeIv9eb+6CkDSQoNTt4XyWoIJvuPsXizxu/Fr23EiekbtZwmh1IcIG/l/a10GQ==}
engines: {node: '>=8'}
+ pkg-dir@5.0.0:
+ resolution: {integrity: sha512-NPE8TDbzl/3YQYY7CSS228s3g2ollTFnc+Qi3tqmqJp9Vg2ovUpixcJEo2HJScN2Ez+kEaal6y70c0ehqJBJeA==}
+ engines: {node: '>=10'}
+
pkg-types@1.1.3:
resolution: {integrity: sha512-+JrgthZG6m3ckicaOB74TwQ+tBWsFl3qVQg7mN8ulwSOElJ7gBhKzj2VkCPnZ4NlF6kEquYU+RIYNVAvzd54UA==}
@@ -8769,6 +8973,9 @@ packages:
resolution: {integrity: sha512-g8+OnU/L2v+wyiVK+D5fA34J7EH8jZ8DDlvwhRCMxmMj7UCBvxiO1mGeN+36JXIKF4zevU4kRBd8lVgG9vLelA==}
engines: {node: ^14.17.0 || ^16.13.0 || >=18.0.0}
+ process-nextick-args@2.0.1:
+ resolution: {integrity: sha512-3ouUOpQhtgrbOa17J7+uxOTpITYWaGP7/AhoR3+A+/1e9skrzelGi/dXzEYyvbxubEF6Wn2ypscTKiKJFFn1ag==}
+
process-on-spawn@1.0.0:
resolution: {integrity: sha512-1WsPDsUSMmZH5LeMLegqkPDrsGgsWwk1Exipy2hvB0o/F0ASzbpIctSCcZIK1ykJvtTJULEH+20WOFjMvGnCTg==}
engines: {node: '>=8'}
@@ -8852,6 +9059,12 @@ packages:
psl@1.9.0:
resolution: {integrity: sha512-E/ZsdU4HLs/68gYzgGTkMicWTLPdAftJLfJFlLUAAKZGkStNU72sZjT66SnMDVOfOWY/YAoiD7Jxa9iHvngcag==}
+ public-encrypt@4.0.3:
+ resolution: {integrity: sha512-zVpa8oKZSz5bTMTFClc1fQOnyyEzpl5ozpi1B5YcvBrdohMjH2rfsBtyXcuNuwjsDIXmBYlF2N5FlJYhR29t8Q==}
+
+ punycode@1.4.1:
+ resolution: {integrity: sha512-jmYNElW7yvO7TV33CjSmvSiE2yco3bV2czu/OzDKdMNVZQWfxCblURLhf+47syQRBntjfLdd/H0egrzIG+oaFQ==}
+
punycode@2.3.1:
resolution: {integrity: sha512-vYt7UD1U9Wg6138shLtLOvdAu+8DsC/ilFtEVHcH+wydcSpNE20AfSOduf6MkRFahL5FY7X1oU7nKVZFtfq8Fg==}
engines: {node: '>=6'}
@@ -8863,10 +9076,18 @@ packages:
resolution: {integrity: sha512-MvjoMCJwEarSbUYk5O+nmoSzSutSsTwF85zcHPQ9OrlFoZOYIjaqBAJIqIXjptyD5vThxGq52Xu/MaJzRkIk4Q==}
engines: {node: '>=0.6'}
+ qs@6.13.0:
+ resolution: {integrity: sha512-+38qI9SOr8tfZ4QmJNplMUxqjbe7LKvvZgWdExBOmd+egZTtjLB67Gu0HRX3u/XOq7UU2Nx6nsjvS16Z9uwfpg==}
+ engines: {node: '>=0.6'}
+
query-string@9.1.0:
resolution: {integrity: sha512-t6dqMECpCkqfyv2FfwVS1xcB6lgXW/0XZSaKdsCNGYkqMO76AFiJEg4vINzoDKcZa6MS7JX+OHIjwh06K5vczw==}
engines: {node: '>=18'}
+ querystring-es3@0.2.1:
+ resolution: {integrity: sha512-773xhDQnZBMFobEiztv8LIl70ch5MSF/jUQVlhwFyBILqq96anmoctVIYz+ZRp0qbCKATTn6ev02M3r7Ga5vqA==}
+ engines: {node: '>=0.4.x'}
+
querystring@0.2.1:
resolution: {integrity: sha512-wkvS7mL/JMugcup3/rMitHmd9ecIGd2lhFhK9N3UUQ450h66d1r3Y9nvXzQAW1Lq+wyx61k/1pfKS5KuKiyEbg==}
engines: {node: '>=0.4.x'}
@@ -8878,6 +9099,12 @@ packages:
queue-microtask@1.2.3:
resolution: {integrity: sha512-NuaNSa6flKT5JaSYQzJok04JzTL1CA6aGhv5rfLW3PgqA+M2ChpZQnAC8h8i4ZFkBS8X5RqkDBHA7r4hej3K9A==}
+ randombytes@2.1.0:
+ resolution: {integrity: sha512-vYl3iOX+4CKUWuxGi9Ukhie6fsqXqS9FE2Zaic4tNFD2N2QQaXOMFbuKK4QmDHC0JO6B1Zp41J0LpT0oR68amQ==}
+
+ randomfill@1.0.4:
+ resolution: {integrity: sha512-87lcbR8+MhcWcUiQ+9e+Rwx8MyR2P7qnt15ynUlbm3TU/fjbgz4GsvfSUDTemtCCtVCqb4ZcEFlyPNTh9bBTLw==}
+
range-parser@1.2.1:
resolution: {integrity: sha512-Hrgsx+orqoygnmhFbKaHE6c296J+HTAQXoxEF6gNupROmmGJRoyzfG3ccAveqCBrwr/2yxQ5BVd/GTl5agOwSg==}
engines: {node: '>= 0.6'}
@@ -9078,6 +9305,9 @@ packages:
resolution: {integrity: sha512-VIMnQi/Z4HT2Fxuwg5KrY174U1VdUIASQVWXXyqtNRtxSr9IYkn1rsI6Tb6HsrHCmB7gVpNwX6JxPTHcH6IoTA==}
engines: {node: '>=6'}
+ readable-stream@2.3.8:
+ resolution: {integrity: sha512-8p0AUk4XODgIewSi0l8Epjs+EVnWiK7NoDIEGU0HhE7+ZyY8D1IMY7odu5lRrFXGg71L15KG8QrPmum45RTtdA==}
+
readable-stream@3.6.2:
resolution: {integrity: sha512-9u/sniCrY3D5WdsERHzHE4G2YCXqoG5FTHUiCC4SIbr6XcLZBY05ya9EKjYek9O5xOAwjGq+1JdGBAS7Q9ScoA==}
engines: {node: '>= 6'}
@@ -9240,6 +9470,9 @@ packages:
engines: {node: 20 || >=22}
hasBin: true
+ ripemd160@2.0.2:
+ resolution: {integrity: sha512-ii4iagi25WusVoiC4B4lq7pbXfAp3D9v5CwfkY33vffw2+pkDjY1D8GaN7spsxvCSx8dkPqOZCEZyfxcmJG2IA==}
+
rollup-plugin-ignore@1.0.10:
resolution: {integrity: sha512-VsbnfwwaTv2Dxl2onubetX/3RnSnplNnjdix0hvF8y2YpqdzlZrjIq6zkcuVJ08XysS8zqW3gt3ORBndFDgsrg==}
@@ -9284,6 +9517,9 @@ packages:
resolution: {integrity: sha512-vj6RsCsWBCf19jIeHEfkRMw8DPiBb+DMXklQ/1SGDHOMlHdPUkZXFQ2YdplS23zESTijAcurb1aSgJA3AgMu1Q==}
engines: {node: '>=0.4'}
+ safe-buffer@5.1.2:
+ resolution: {integrity: sha512-Gd2UZBJDkXlY7GbJxfsE8/nvKkUEU1G38c1siN6QP6a9PT9MmHB8GnpscSmMJSoF8LOIrt8ud/wPtojys4G6+g==}
+
safe-buffer@5.2.1:
resolution: {integrity: sha512-rp3So07KcdmmKbGvgaNxQSJr7bGVSVk5S9Eq1F+ppbRo70+YeaDxkw5Dd8NPN+GD6bjnYm2VuPuCXmpuYvmCXQ==}
@@ -9353,9 +9589,16 @@ packages:
resolution: {integrity: sha512-7PGFlmtwsEADb0WYyvCMa1t+yke6daIG4Wirafur5kcf+MhUnPms1UeR0CKQdTZD81yESwMHbtn+TR+dMviakQ==}
engines: {node: '>= 0.4'}
+ setimmediate@1.0.5:
+ resolution: {integrity: sha512-MATJdZp8sLqDl/68LfQmbP8zKPLQNV6BIZoIgrscFDQ+RsvK/BxeDQOgyxKKoh0y/8h3BqVFnCqQ/gd+reiIXA==}
+
setprototypeof@1.2.0:
resolution: {integrity: sha512-E5LDX7Wrp85Kil5bhZv46j8jOeboKq5JMmYM3gVGdGH8xFpPWXUMsNrlODCrkoxMEeNi/XZIwuRvY4XNwYMJpw==}
+ sha.js@2.4.11:
+ resolution: {integrity: sha512-QMEp5B7cftE7APOjk5Y6xgrbWu+WkLVQwk8JNjZ8nKRciZaByEW6MubieAiToS7+dwvrjGhH8jRXz3MVd0AYqQ==}
+ hasBin: true
+
shallow-clone@0.1.2:
resolution: {integrity: sha512-J1zdXCky5GmNnuauESROVu31MQSnLoYvlyEn6j2Ztk6Q5EHFIhxkMhYcv6vuDzl2XEzoRr856QwzMgWM/TmZgw==}
engines: {node: '>=0.10.0'}
@@ -9384,6 +9627,9 @@ packages:
resolution: {integrity: sha512-fDW/EZ6Q9RiO8eFG8Hj+7u/oW+XrPTIChwCOM2+th2A6OblDtYYIpve9m+KvI9Z4C9qSEXlaGR6bTEYHReuglA==}
engines: {node: '>= 0.4'}
+ siginfo@2.0.0:
+ resolution: {integrity: sha512-ybx0WO1/8bSBLEWXZvEd7gMW3Sn3JFlW3TvX1nREbDLRNQNaeNN8WK0meBwPdAaOI7TtRRRJn/Es1zhrrCHu7g==}
+
signal-exit@3.0.7:
resolution: {integrity: sha512-wnD2ZE+l+SPC/uoS0vXeE9L1+0wuaMqKlfz9AMUo38JsyLSBWSFcHR1Rri62LZc12vLr1gb3jl7iwQhgwpAbGQ==}
@@ -9482,10 +9728,16 @@ packages:
resolution: {integrity: sha512-XlkWvfIm6RmsWtNJx+uqtKLS8eqFbxUg0ZzLXqY0caEy9l7hruX8IpiDnjsLavoBgqCCR71TqWO8MaXYheJ3RQ==}
engines: {node: '>=10'}
+ stackback@0.0.2:
+ resolution: {integrity: sha512-1XMJE5fQo1jGH6Y/7ebnwPOBEkIEnT4QF32d5R1+VXdXveM0IBMJt8zfaxX1P3QhVwrYe+576+jkANtSS2mBbw==}
+
statuses@2.0.1:
resolution: {integrity: sha512-RwNA9Z/7PrK06rYLIzFMlaF+l73iwpzsqRIFgbMLbTcLD6cOao82TaWefPXQvB2fOC4AjuYSEndS7N/mTCbkdQ==}
engines: {node: '>= 0.8'}
+ std-env@3.7.0:
+ resolution: {integrity: sha512-JPbdCEQLj1w5GilpiHAx3qJvFndqybBysA3qUOnznweH4QbNYUsW/ea8QzSrnh0vNsezMMw5bcVool8lM0gwzg==}
+
stdin-discarder@0.2.2:
resolution: {integrity: sha512-UhDfHmA92YAlNnCfhmq0VeNL5bDbiZGg7sZ2IvPsXubGkiNa9EC+tUTsjBRsYUAz87btI6/1wf4XoVvQ3uRnmQ==}
engines: {node: '>=18'}
@@ -9505,6 +9757,12 @@ packages:
resolution: {integrity: sha512-6hwbCR7t9EaHyGFhsV38Tu2yuIGx1Bllow3ojwDj2/lk6WwHUQ3lrwtSA5aYnjlajBmeFTSD+JhLgNM4HfU1jw==}
hasBin: true
+ stream-browserify@3.0.0:
+ resolution: {integrity: sha512-H73RAHsVBapbim0tU2JwwOiXUj+fikfiaoYAKHF3VJfA0pe2BCzkhAHBlLG6REzE+2WNZcxOXjK7lkso+9euLA==}
+
+ stream-http@3.2.0:
+ resolution: {integrity: sha512-Oq1bLqisTyK3TSCXpPbT4sdeYNdmyZJv1LxpEm2vu1ZhK89kSE5YXwZc3cWk0MagGaKriBh9mCFbVGtO+vY29A==}
+
streamsearch@1.1.0:
resolution: {integrity: sha512-Mcc5wHehp9aXz1ax6bZUyY5afg9u2rv5cqQI3mRrYkGC8rW2hM02jWuwjtL++LS5qinSyhj2QfLyNsuc+VsExg==}
engines: {node: '>=10.0.0'}
@@ -9570,6 +9828,9 @@ packages:
resolution: {integrity: sha512-UXSH262CSZY1tfu3G3Secr6uGLCFVPMhIqHjlgCUtCCcgihYc/xKs9djMTMUOb2j1mVSeU8EU6NWc/iQKU6Gfg==}
engines: {node: '>= 0.4'}
+ string_decoder@1.1.1:
+ resolution: {integrity: sha512-n/ShnvDi6FHbbVfviro+WojiFzv+s8MPMHBczVePfUpDJLwoLT0ht1l4YwBCbi8pJAveEEdnkHyPyTP/mzRfwg==}
+
string_decoder@1.3.0:
resolution: {integrity: sha512-hkRX8U1WjJFd8LsDJ2yQ/wWWxaopEsABU1XfkM8A+j0+85JAGppt16cr1Whg6KIbb4okU6Mql6BOj+uup/wKeA==}
@@ -9812,13 +10073,32 @@ packages:
thenify@3.3.1:
resolution: {integrity: sha512-RVZSIV5IG10Hk3enotrhvz0T9em6cyHBLkH/YAZuKqd8hRkKhSfCGIcP2KUY0EPxndzANBmNllzWPwak+bheSw==}
+ timers-browserify@2.0.12:
+ resolution: {integrity: sha512-9phl76Cqm6FhSX9Xe1ZUAMLtm1BLkKj2Qd5ApyWkXzsMRaA7dgr81kf4wJmQf/hAvg8EEyJxDo3du/0KlhPiKQ==}
+ engines: {node: '>=0.6.0'}
+
tiny-invariant@1.3.3:
resolution: {integrity: sha512-+FbBPE1o9QAYvviau/qC5SE3caw21q3xkvWKBtja5vgqOWIHHJ3ioaq1VPfn/Szqctz2bU/oYeKd9/z5BL+PVg==}
+ tinybench@2.9.0:
+ resolution: {integrity: sha512-0+DUvqWMValLmha6lr4kD8iAMK1HzV0/aKnCtWb9v9641TnP/MFb7Pc2bxoxQjTXAErryXVgUOfv2YqNllqGeg==}
+
+ tinypool@1.0.1:
+ resolution: {integrity: sha512-URZYihUbRPcGv95En+sz6MfghfIc2OJ1sv/RmhWZLouPY0/8Vo80viwPvg3dlaS9fuq7fQMEfgRRK7BBZThBEA==}
+ engines: {node: ^18.0.0 || >=20.0.0}
+
+ tinyrainbow@1.2.0:
+ resolution: {integrity: sha512-weEDEq7Z5eTHPDh4xjX789+fHfF+P8boiFB+0vbWzpbnbsEr/GRaohi/uMKxg8RZMXnl1ItAi/IUHWMsjDV7kQ==}
+ engines: {node: '>=14.0.0'}
+
tinyspy@2.2.1:
resolution: {integrity: sha512-KYad6Vy5VDWV4GH3fjpseMQ/XU2BhIYP7Vzd0LG44qRWm/Yt2WCOTicFdvmgo6gWaqooMQCawTtILVQJupKu7A==}
engines: {node: '>=14.0.0'}
+ tinyspy@3.0.0:
+ resolution: {integrity: sha512-q5nmENpTHgiPVd1cJDDc9cVoYN5x4vCvwT3FMilvKPKneCBZAxn2YWQjDF0UMcE9k0Cay1gBiDfTMU0g+mPMQA==}
+ engines: {node: '>=14.0.0'}
+
title-case@3.0.3:
resolution: {integrity: sha512-e1zGYRvbffpcHIrnuqT0Dh+gEJtDaxDSoG4JAIpq4oDFyooziLBIiYQv0GBT4FUAnUop5uZ1hiIAj7oAF6sOCA==}
@@ -9945,6 +10225,9 @@ packages:
engines: {node: '>=18.0.0'}
hasBin: true
+ tty-browserify@0.0.1:
+ resolution: {integrity: sha512-C3TaO7K81YvjCgQH9Q1S3R3P3BtN3RIM8n+OvX4il1K1zgE8ZhI0op7kClgkxtutIE8hQrcrHBXvIheqKUUCxw==}
+
turbo-darwin-64@2.0.14:
resolution: {integrity: sha512-kwfDmjNwlNfvtrvT29+ZBg5n1Wvxl891bFHchMJyzMoR0HOE9N1NSNdSZb9wG3e7sYNIu4uDkNk+VBEqJW0HzQ==}
cpu: [x64]
@@ -10184,6 +10467,10 @@ packages:
url-parse@1.5.10:
resolution: {integrity: sha512-WypcfiRhfeUP9vvF0j6rw0J3hrWrw6iZv3+22h6iRMJ/8z1Tj6XfLP4DsUix5MhMPnXpiHDoKyoZ/bdCkwBCiQ==}
+ url@0.11.4:
+ resolution: {integrity: sha512-oCwdVC7mTuWiPyjLUz/COz5TLk6wgp0RCsN+wHZ2Ekneac9w8uuV0njcbbie2ME+Vs+d6duwmYuR3HgQXs1fOg==}
+ engines: {node: '>= 0.4'}
+
use-callback-ref@1.3.2:
resolution: {integrity: sha512-elOQwe6Q8gqZgDA8mrh44qRTQqpIHDcZ3hXTLjBe1i4ph8XpNJnO+aQf3NaG+lriLopI4HMx9VjQLfPQ6vhnoA==}
engines: {node: '>=10'}
@@ -10295,6 +10582,16 @@ packages:
vfile@6.0.2:
resolution: {integrity: sha512-zND7NlS8rJYb/sPqkb13ZvbbUoExdbi4w3SfRrMq6R3FvnLQmmfpajJNITuuYm6AZ5uao9vy4BAos3EXBPf2rg==}
+ vite-node@2.0.5:
+ resolution: {integrity: sha512-LdsW4pxj0Ot69FAoXZ1yTnA9bjGohr2yNBU7QKRxpz8ITSkhuDl6h3zS/tvgz4qrNjeRnvrWeXQ8ZF7Um4W00Q==}
+ engines: {node: ^18.0.0 || >=20.0.0}
+ hasBin: true
+
+ vite-plugin-node-polyfills@0.22.0:
+ resolution: {integrity: sha512-F+G3LjiGbG8QpbH9bZ//GSBr9i1InSTkaulfUHFa9jkLqVGORFBoqc2A/Yu5Mmh1kNAbiAeKeK+6aaQUf3x0JA==}
+ peerDependencies:
+ vite: ^2.0.0 || ^3.0.0 || ^4.0.0 || ^5.0.0
+
vite@5.4.2:
resolution: {integrity: sha512-dDrQTRHp5C1fTFzcSaMxjk6vdpKvT+2/mIdE07Gw2ykehT49O0z/VHS3zZ8iV/Gh8BJJKHWOe5RjaNrW5xf/GA==}
engines: {node: ^18.0.0 || >=20.0.0}
@@ -10326,6 +10623,39 @@ packages:
terser:
optional: true
+ vitest-axe@0.1.0:
+ resolution: {integrity: sha512-jvtXxeQPg8R/2ANTY8QicA5pvvdRP4F0FsVUAHANJ46YCDASie/cuhlSzu0DGcLmZvGBSBNsNuK3HqfaeknyvA==}
+ peerDependencies:
+ vitest: '>=0.16.0'
+
+ vitest@2.0.5:
+ resolution: {integrity: sha512-8GUxONfauuIdeSl5f9GTgVEpg5BTOlplET4WEDaeY2QBiN8wSm68vxN/tb5z405OwppfoCavnwXafiaYBC/xOA==}
+ engines: {node: ^18.0.0 || >=20.0.0}
+ hasBin: true
+ 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
+
+ vm-browserify@1.1.2:
+ resolution: {integrity: sha512-2ham8XPWTONajOR0ohOKOHXkm3+gaBmGut3SRuu75xLd/RRaY6vqgh8NBYYk7+RW3u5AtzPQZG8F10LHkl0lAQ==}
+
w3c-keyname@2.2.8:
resolution: {integrity: sha512-dpojBhNsCNN7T82Tm7k26A6G9ML3NkhDsnw9n/eoxSRlVBB4CEtIQ/KTCLI2Fwf3ataSXRhYFkQi3SlnFwPvPQ==}
@@ -10424,6 +10754,11 @@ packages:
engines: {node: ^16.13.0 || >=18.0.0}
hasBin: true
+ why-is-node-running@2.3.0:
+ resolution: {integrity: sha512-hUrmaWBdVDcxvYqnyh09zunKzROWjbZTiNy8dBEjkS7ehEDQibXJ7XvlmtbwuTclUiIyN+CyXQD4Vmko8fNm8w==}
+ engines: {node: '>=8'}
+ hasBin: true
+
win-release@1.1.1:
resolution: {integrity: sha512-iCRnKVvGxOQdsKhcQId2PXV1vV3J/sDPXKA4Oe9+Eti2nb2ESEsYHRYls/UjoUW3bIc5ZDO8dTH50A/5iVN+bw==}
engines: {node: '>=0.10.0'}
@@ -10499,6 +10834,10 @@ packages:
xmlchars@2.2.0:
resolution: {integrity: sha512-JZnDKK8B0RCDw84FNdDAIpZK+JuJw+s7Lz8nksI7SIuU3UXJJslUthsi+uWBUYOwPFwW7W7PRLRfUKpxjtjFCw==}
+ xtend@4.0.2:
+ resolution: {integrity: sha512-LKYU1iAXJXUgAXn9URjiu+MWhyUXHsvfp7mcuYm9dSUKK0/CjtrUwFAxD82/mCWbtLsGjFIad0wIsod4zrTAEQ==}
+ engines: {node: '>=0.4'}
+
y18n@3.2.2:
resolution: {integrity: sha512-uGZHXkHnhF0XeeAPgnKfPv1bgKAYyVvmNL1xlKsPYZPaIHxGti2hHqvOCQv71XMsLxu1QjergkqogUnms5D3YQ==}
@@ -11667,6 +12006,7 @@ snapshots:
'@cspotcode/source-map-support@0.8.1':
dependencies:
'@jridgewell/trace-mapping': 0.3.9
+ optional: true
'@csstools/cascade-layer-name-parser@1.0.13(@csstools/css-parser-algorithms@2.7.1(@csstools/css-tokenizer@2.4.1))(@csstools/css-tokenizer@2.4.1)':
dependencies:
@@ -12911,6 +13251,7 @@ snapshots:
dependencies:
'@jridgewell/resolve-uri': 3.1.2
'@jridgewell/sourcemap-codec': 1.5.0
+ optional: true
'@jsdevtools/ono@7.1.3': {}
@@ -14087,6 +14428,14 @@ snapshots:
optionalDependencies:
rollup: 4.20.0
+ '@rollup/plugin-inject@5.0.5(rollup@4.20.0)':
+ dependencies:
+ '@rollup/pluginutils': 5.1.0(rollup@4.20.0)
+ estree-walker: 2.0.2
+ magic-string: 0.30.11
+ optionalDependencies:
+ rollup: 4.20.0
+
'@rollup/plugin-node-resolve@15.2.3(rollup@4.20.0)':
dependencies:
'@rollup/pluginutils': 5.1.0(rollup@4.20.0)
@@ -14252,11 +14601,11 @@ snapshots:
'@storybook/global': 5.0.0
storybook: 8.3.0-alpha.7
- '@storybook/addon-interactions@8.2.9(@jest/globals@29.7.0)(@types/jest@29.5.12)(jest@29.7.0(@types/node@20.14.15)(ts-node@10.9.2(@swc/core@1.7.10(@swc/helpers@0.5.11))(@types/node@20.14.15)(typescript@5.5.4)))(storybook@8.3.0-alpha.7)':
+ '@storybook/addon-interactions@8.2.9(@jest/globals@29.7.0)(@types/jest@29.5.12)(jest@29.7.0(@types/node@20.14.15)(ts-node@10.9.2(@swc/core@1.7.10(@swc/helpers@0.5.11))(@types/node@20.14.15)(typescript@5.5.4)))(storybook@8.3.0-alpha.7)(vitest@2.0.5(@types/node@20.14.15)(jsdom@20.0.3)(less@4.2.0)(sass@1.77.8)(stylus@0.62.0)(terser@5.31.5))':
dependencies:
'@storybook/global': 5.0.0
'@storybook/instrumenter': 8.2.9(storybook@8.3.0-alpha.7)
- '@storybook/test': 8.2.9(@jest/globals@29.7.0)(@types/jest@29.5.12)(jest@29.7.0(@types/node@20.14.15)(ts-node@10.9.2(@swc/core@1.7.10(@swc/helpers@0.5.11))(@types/node@20.14.15)(typescript@5.5.4)))(storybook@8.3.0-alpha.7)
+ '@storybook/test': 8.2.9(@jest/globals@29.7.0)(@types/jest@29.5.12)(jest@29.7.0(@types/node@20.14.15)(ts-node@10.9.2(@swc/core@1.7.10(@swc/helpers@0.5.11))(@types/node@20.14.15)(typescript@5.5.4)))(storybook@8.3.0-alpha.7)(vitest@2.0.5(@types/node@20.14.15)(jsdom@20.0.3)(less@4.2.0)(sass@1.77.8)(stylus@0.62.0)(terser@5.31.5))
polished: 4.3.1
storybook: 8.3.0-alpha.7
ts-dedent: 2.2.0
@@ -14585,12 +14934,12 @@ snapshots:
- supports-color
- ts-node
- '@storybook/test@8.2.9(@jest/globals@29.7.0)(@types/jest@29.5.12)(jest@29.7.0(@types/node@20.14.15)(ts-node@10.9.2(@swc/core@1.7.10(@swc/helpers@0.5.11))(@types/node@20.14.15)(typescript@5.5.4)))(storybook@8.3.0-alpha.7)':
+ '@storybook/test@8.2.9(@jest/globals@29.7.0)(@types/jest@29.5.12)(jest@29.7.0(@types/node@20.14.15)(ts-node@10.9.2(@swc/core@1.7.10(@swc/helpers@0.5.11))(@types/node@20.14.15)(typescript@5.5.4)))(storybook@8.3.0-alpha.7)(vitest@2.0.5(@types/node@20.14.15)(jsdom@20.0.3)(less@4.2.0)(sass@1.77.8)(stylus@0.62.0)(terser@5.31.5))':
dependencies:
'@storybook/csf': 0.1.11
'@storybook/instrumenter': 8.2.9(storybook@8.3.0-alpha.7)
'@testing-library/dom': 10.1.0
- '@testing-library/jest-dom': 6.4.5(@jest/globals@29.7.0)(@types/jest@29.5.12)(jest@29.7.0(@types/node@20.14.15)(ts-node@10.9.2(@swc/core@1.7.10(@swc/helpers@0.5.11))(@types/node@20.14.15)(typescript@5.5.4)))
+ '@testing-library/jest-dom': 6.4.5(@jest/globals@29.7.0)(@types/jest@29.5.12)(jest@29.7.0(@types/node@20.14.15)(ts-node@10.9.2(@swc/core@1.7.10(@swc/helpers@0.5.11))(@types/node@20.14.15)(typescript@5.5.4)))(vitest@2.0.5(@types/node@20.14.15)(jsdom@20.0.3)(less@4.2.0)(sass@1.77.8)(stylus@0.62.0)(terser@5.31.5))
'@testing-library/user-event': 14.5.2(@testing-library/dom@10.1.0)
'@vitest/expect': 1.6.0
'@vitest/spy': 1.6.0
@@ -14755,7 +15104,7 @@ snapshots:
lz-string: 1.5.0
pretty-format: 27.5.1
- '@testing-library/jest-dom@6.4.5(@jest/globals@29.7.0)(@types/jest@29.5.12)(jest@29.7.0(@types/node@20.14.15)(ts-node@10.9.2(@swc/core@1.7.10(@swc/helpers@0.5.11))(@types/node@20.14.15)(typescript@5.5.4)))':
+ '@testing-library/jest-dom@6.4.5(@jest/globals@29.7.0)(@types/jest@29.5.12)(jest@29.7.0(@types/node@20.14.15)(ts-node@10.9.2(@swc/core@1.7.10(@swc/helpers@0.5.11))(@types/node@20.14.15)(typescript@5.5.4)))(vitest@2.0.5(@types/node@20.14.15)(jsdom@20.0.3)(less@4.2.0)(sass@1.77.8)(stylus@0.62.0)(terser@5.31.5))':
dependencies:
'@adobe/css-tools': 4.4.0
'@babel/runtime': 7.25.0
@@ -14769,11 +15118,11 @@ snapshots:
'@jest/globals': 29.7.0
'@types/jest': 29.5.12
jest: 29.7.0(@types/node@20.14.15)(babel-plugin-macros@3.1.0)(ts-node@10.9.2(@swc/core@1.7.10(@swc/helpers@0.5.11))(@types/node@20.14.15)(typescript@5.5.4))
+ vitest: 2.0.5(@types/node@20.14.15)(jsdom@20.0.3)(less@4.2.0)(sass@1.77.8)(stylus@0.62.0)(terser@5.31.5)
- '@testing-library/jest-dom@6.4.8':
+ '@testing-library/jest-dom@6.5.0':
dependencies:
'@adobe/css-tools': 4.4.0
- '@babel/runtime': 7.25.0
aria-query: 5.3.0
chalk: 3.0.0
css.escape: 1.5.1
@@ -14781,10 +15130,10 @@ snapshots:
lodash: 4.17.21
redent: 3.0.0
- '@testing-library/react@16.0.0(@testing-library/dom@10.4.0)(@types/react-dom@18.3.0)(@types/react@18.3.4)(react-dom@18.3.1(react@18.3.1))(react@18.3.1)':
+ '@testing-library/react@16.0.0(@testing-library/dom@10.1.0)(@types/react-dom@18.3.0)(@types/react@18.3.4)(react-dom@18.3.1(react@18.3.1))(react@18.3.1)':
dependencies:
'@babel/runtime': 7.25.0
- '@testing-library/dom': 10.4.0
+ '@testing-library/dom': 10.1.0
react: 18.3.1
react-dom: 18.3.1(react@18.3.1)
optionalDependencies:
@@ -14795,21 +15144,22 @@ snapshots:
dependencies:
'@testing-library/dom': 10.1.0
- '@testing-library/user-event@14.5.2(@testing-library/dom@10.4.0)':
- dependencies:
- '@testing-library/dom': 10.4.0
-
- '@tootallnate/once@2.0.0': {}
+ '@tootallnate/once@2.0.0':
+ optional: true
'@trysound/sax@0.2.0': {}
- '@tsconfig/node10@1.0.11': {}
+ '@tsconfig/node10@1.0.11':
+ optional: true
- '@tsconfig/node12@1.0.11': {}
+ '@tsconfig/node12@1.0.11':
+ optional: true
- '@tsconfig/node14@1.0.3': {}
+ '@tsconfig/node14@1.0.3':
+ optional: true
- '@tsconfig/node16@1.0.4': {}
+ '@tsconfig/node16@1.0.4':
+ optional: true
'@types/acorn@4.0.6':
dependencies:
@@ -14970,12 +15320,6 @@ snapshots:
'@types/js-yaml@3.12.10': {}
- '@types/jsdom@20.0.1':
- dependencies:
- '@types/node': 20.14.15
- '@types/tough-cookie': 4.0.5
- parse5: 7.1.2
-
'@types/json-schema@7.0.15': {}
'@types/json-stable-stringify@1.0.36': {}
@@ -15101,8 +15445,6 @@ snapshots:
dependencies:
'@types/node': 20.14.15
- '@types/tough-cookie@4.0.5': {}
-
'@types/unist@2.0.10': {}
'@types/unist@3.0.2': {}
@@ -15164,6 +15506,11 @@ snapshots:
'@typescript-eslint/types': 6.21.0
'@typescript-eslint/visitor-keys': 6.21.0
+ '@typescript-eslint/scope-manager@7.18.0':
+ dependencies:
+ '@typescript-eslint/types': 7.18.0
+ '@typescript-eslint/visitor-keys': 7.18.0
+
'@typescript-eslint/scope-manager@8.1.0':
dependencies:
'@typescript-eslint/types': 8.1.0
@@ -15185,6 +15532,8 @@ snapshots:
'@typescript-eslint/types@6.21.0': {}
+ '@typescript-eslint/types@7.18.0': {}
+
'@typescript-eslint/types@8.1.0': {}
'@typescript-eslint/typescript-estree@5.62.0(typescript@5.5.4)':
@@ -15216,10 +15565,10 @@ snapshots:
transitivePeerDependencies:
- supports-color
- '@typescript-eslint/typescript-estree@8.1.0(typescript@5.5.4)':
+ '@typescript-eslint/typescript-estree@7.18.0(typescript@5.5.4)':
dependencies:
- '@typescript-eslint/types': 8.1.0
- '@typescript-eslint/visitor-keys': 8.1.0
+ '@typescript-eslint/types': 7.18.0
+ '@typescript-eslint/visitor-keys': 7.18.0
debug: 4.3.6
globby: 11.1.0
is-glob: 4.0.3
@@ -15231,7 +15580,22 @@ snapshots:
transitivePeerDependencies:
- supports-color
- '@typescript-eslint/utils@5.62.0(eslint@8.57.0)(typescript@5.5.4)':
+ '@typescript-eslint/typescript-estree@8.1.0(typescript@5.5.4)':
+ dependencies:
+ '@typescript-eslint/types': 8.1.0
+ '@typescript-eslint/visitor-keys': 8.1.0
+ debug: 4.3.6
+ globby: 11.1.0
+ is-glob: 4.0.3
+ minimatch: 9.0.5
+ semver: 7.6.3
+ ts-api-utils: 1.3.0(typescript@5.5.4)
+ optionalDependencies:
+ typescript: 5.5.4
+ transitivePeerDependencies:
+ - supports-color
+
+ '@typescript-eslint/utils@5.62.0(eslint@8.57.0)(typescript@5.5.4)':
dependencies:
'@eslint-community/eslint-utils': 4.4.0(eslint@8.57.0)
'@types/json-schema': 7.0.15
@@ -15260,6 +15624,17 @@ snapshots:
- supports-color
- typescript
+ '@typescript-eslint/utils@7.18.0(eslint@8.57.0)(typescript@5.5.4)':
+ dependencies:
+ '@eslint-community/eslint-utils': 4.4.0(eslint@8.57.0)
+ '@typescript-eslint/scope-manager': 7.18.0
+ '@typescript-eslint/types': 7.18.0
+ '@typescript-eslint/typescript-estree': 7.18.0(typescript@5.5.4)
+ eslint: 8.57.0
+ transitivePeerDependencies:
+ - supports-color
+ - typescript
+
'@typescript-eslint/utils@8.1.0(eslint@8.57.0)(typescript@5.5.4)':
dependencies:
'@eslint-community/eslint-utils': 4.4.0(eslint@8.57.0)
@@ -15281,6 +15656,11 @@ snapshots:
'@typescript-eslint/types': 6.21.0
eslint-visitor-keys: 3.4.3
+ '@typescript-eslint/visitor-keys@7.18.0':
+ dependencies:
+ '@typescript-eslint/types': 7.18.0
+ eslint-visitor-keys: 3.4.3
+
'@typescript-eslint/visitor-keys@8.1.0':
dependencies:
'@typescript-eslint/types': 8.1.0
@@ -15305,10 +15685,36 @@ snapshots:
'@vitest/utils': 1.6.0
chai: 4.5.0
+ '@vitest/expect@2.0.5':
+ dependencies:
+ '@vitest/spy': 2.0.5
+ '@vitest/utils': 2.0.5
+ chai: 5.1.1
+ tinyrainbow: 1.2.0
+
+ '@vitest/pretty-format@2.0.5':
+ dependencies:
+ tinyrainbow: 1.2.0
+
+ '@vitest/runner@2.0.5':
+ dependencies:
+ '@vitest/utils': 2.0.5
+ pathe: 1.1.2
+
+ '@vitest/snapshot@2.0.5':
+ dependencies:
+ '@vitest/pretty-format': 2.0.5
+ magic-string: 0.30.11
+ pathe: 1.1.2
+
'@vitest/spy@1.6.0':
dependencies:
tinyspy: 2.2.1
+ '@vitest/spy@2.0.5':
+ dependencies:
+ tinyspy: 3.0.0
+
'@vitest/utils@1.6.0':
dependencies:
diff-sequences: 29.6.3
@@ -15316,6 +15722,13 @@ snapshots:
loupe: 2.3.7
pretty-format: 29.7.0
+ '@vitest/utils@2.0.5':
+ dependencies:
+ '@vitest/pretty-format': 2.0.5
+ estree-walker: 3.0.3
+ loupe: 3.1.1
+ tinyrainbow: 1.2.0
+
'@yarnpkg/fslib@2.10.3':
dependencies:
'@yarnpkg/libzip': 2.3.0
@@ -15326,7 +15739,8 @@ snapshots:
'@types/emscripten': 1.39.13
tslib: 1.14.1
- abab@2.0.6: {}
+ abab@2.0.6:
+ optional: true
abbrev@2.0.0: {}
@@ -15339,6 +15753,7 @@ snapshots:
dependencies:
acorn: 8.12.1
acorn-walk: 8.3.3
+ optional: true
acorn-jsx@5.3.2(acorn@7.4.1):
dependencies:
@@ -15353,6 +15768,7 @@ snapshots:
acorn-walk@8.3.3:
dependencies:
acorn: 8.12.1
+ optional: true
acorn@7.4.1: {}
@@ -15363,6 +15779,7 @@ snapshots:
debug: 4.3.6
transitivePeerDependencies:
- supports-color
+ optional: true
aggregate-error@3.1.0:
dependencies:
@@ -15433,7 +15850,8 @@ snapshots:
archy@1.0.0: {}
- arg@4.1.3: {}
+ arg@4.1.3:
+ optional: true
arg@5.0.2: {}
@@ -15532,8 +15950,24 @@ snapshots:
is-array-buffer: 3.0.4
is-shared-array-buffer: 1.0.3
+ asn1.js@4.10.1:
+ dependencies:
+ bn.js: 4.12.0
+ inherits: 2.0.4
+ minimalistic-assert: 1.0.1
+
+ assert@2.1.0:
+ dependencies:
+ call-bind: 1.0.7
+ is-nan: 1.3.2
+ object-is: 1.1.6
+ object.assign: 4.1.5
+ util: 0.12.5
+
assertion-error@1.1.0: {}
+ assertion-error@2.0.1: {}
+
ast-types-flow@0.0.8: {}
ast-types@0.16.1:
@@ -15542,7 +15976,8 @@ snapshots:
astral-regex@2.0.0: {}
- async@3.2.5: {}
+ async@3.2.5:
+ optional: true
asynckit@0.4.0: {}
@@ -15725,6 +16160,10 @@ snapshots:
inherits: 2.0.4
readable-stream: 3.6.2
+ bn.js@4.12.0: {}
+
+ bn.js@5.2.1: {}
+
body-parser@1.20.2:
dependencies:
bytes: 3.1.2
@@ -15757,8 +16196,58 @@ snapshots:
dependencies:
fill-range: 7.1.1
+ brorand@1.1.0: {}
+
browser-assert@1.2.1: {}
+ browser-resolve@2.0.0:
+ dependencies:
+ resolve: 1.22.8
+
+ browserify-aes@1.2.0:
+ dependencies:
+ buffer-xor: 1.0.3
+ cipher-base: 1.0.4
+ create-hash: 1.2.0
+ evp_bytestokey: 1.0.3
+ inherits: 2.0.4
+ safe-buffer: 5.2.1
+
+ browserify-cipher@1.0.1:
+ dependencies:
+ browserify-aes: 1.2.0
+ browserify-des: 1.0.2
+ evp_bytestokey: 1.0.3
+
+ browserify-des@1.0.2:
+ dependencies:
+ cipher-base: 1.0.4
+ des.js: 1.1.0
+ inherits: 2.0.4
+ safe-buffer: 5.2.1
+
+ browserify-rsa@4.1.0:
+ dependencies:
+ bn.js: 5.2.1
+ randombytes: 2.1.0
+
+ browserify-sign@4.2.3:
+ dependencies:
+ bn.js: 5.2.1
+ browserify-rsa: 4.1.0
+ create-hash: 1.2.0
+ create-hmac: 1.1.7
+ elliptic: 6.5.7
+ hash-base: 3.0.4
+ inherits: 2.0.4
+ parse-asn1: 5.1.7
+ readable-stream: 2.3.8
+ safe-buffer: 5.2.1
+
+ browserify-zlib@0.2.0:
+ dependencies:
+ pako: 1.0.11
+
browserslist@4.23.3:
dependencies:
caniuse-lite: 1.0.30001651
@@ -15769,6 +16258,7 @@ snapshots:
bs-logger@0.2.6:
dependencies:
fast-json-stable-stringify: 2.1.0
+ optional: true
bser@2.1.1:
dependencies:
@@ -15776,6 +16266,8 @@ snapshots:
buffer-from@1.1.2: {}
+ buffer-xor@1.0.3: {}
+
buffer@5.7.1:
dependencies:
base64-js: 1.5.1
@@ -15783,6 +16275,8 @@ snapshots:
builtin-modules@3.3.0: {}
+ builtin-status-codes@3.0.0: {}
+
busboy@1.6.0:
dependencies:
streamsearch: 1.1.0
@@ -15790,6 +16284,8 @@ snapshots:
bytes@3.1.2: {}
+ cac@6.7.14: {}
+
caching-transform@4.0.0:
dependencies:
hasha: 5.2.2
@@ -15851,6 +16347,14 @@ snapshots:
pathval: 1.1.1
type-detect: 4.1.0
+ chai@5.1.1:
+ dependencies:
+ assertion-error: 2.0.1
+ check-error: 2.1.1
+ deep-eql: 5.0.2
+ loupe: 3.1.1
+ pathval: 2.0.0
+
chalk@1.1.3:
dependencies:
ansi-styles: 2.2.1
@@ -15916,6 +16420,8 @@ snapshots:
dependencies:
get-func-name: 2.0.2
+ check-error@2.1.1: {}
+
chokidar@3.6.0:
dependencies:
anymatch: 3.1.3
@@ -15940,6 +16446,11 @@ snapshots:
ci-info@4.0.0: {}
+ cipher-base@1.0.4:
+ dependencies:
+ inherits: 2.0.4
+ safe-buffer: 5.2.1
+
citty@0.1.6:
dependencies:
consola: 3.2.3
@@ -16080,12 +16591,16 @@ snapshots:
consola@3.2.3: {}
+ console-browserify@1.2.0: {}
+
constant-case@3.0.4:
dependencies:
no-case: 3.0.4
tslib: 2.6.3
upper-case: 2.0.2
+ constants-browserify@1.0.0: {}
+
content-disposition@0.5.4:
dependencies:
safe-buffer: 5.2.1
@@ -16111,6 +16626,8 @@ snapshots:
dependencies:
browserslist: 4.23.3
+ core-util-is@1.0.3: {}
+
cosmiconfig@7.1.0:
dependencies:
'@types/parse-json': 4.0.2
@@ -16128,6 +16645,28 @@ snapshots:
optionalDependencies:
typescript: 5.5.4
+ create-ecdh@4.0.4:
+ dependencies:
+ bn.js: 4.12.0
+ elliptic: 6.5.7
+
+ create-hash@1.2.0:
+ dependencies:
+ cipher-base: 1.0.4
+ inherits: 2.0.4
+ md5.js: 1.3.5
+ ripemd160: 2.0.2
+ sha.js: 2.4.11
+
+ create-hmac@1.1.7:
+ dependencies:
+ cipher-base: 1.0.4
+ create-hash: 1.2.0
+ inherits: 2.0.4
+ ripemd160: 2.0.2
+ safe-buffer: 5.2.1
+ sha.js: 2.4.11
+
create-jest@29.7.0(@types/node@20.14.15)(babel-plugin-macros@3.1.0)(ts-node@10.9.2(@swc/core@1.7.10(@swc/helpers@0.5.11))(@types/node@20.14.15)(typescript@5.5.4)):
dependencies:
'@jest/types': 29.6.3
@@ -16169,6 +16708,20 @@ snapshots:
shebang-command: 2.0.0
which: 2.0.2
+ crypto-browserify@3.12.0:
+ dependencies:
+ browserify-cipher: 1.0.1
+ browserify-sign: 4.2.3
+ create-ecdh: 4.0.4
+ create-hash: 1.2.0
+ create-hmac: 1.1.7
+ diffie-hellman: 5.0.3
+ inherits: 2.0.4
+ pbkdf2: 3.1.2
+ public-encrypt: 4.0.3
+ randombytes: 2.1.0
+ randomfill: 1.0.4
+
crypto-random-string@4.0.0:
dependencies:
type-fest: 1.4.0
@@ -16250,8 +16803,6 @@ snapshots:
cssesc@3.0.0: {}
- cssfontparser@1.2.1: {}
-
cssnano-preset-default@5.2.14(postcss@8.4.41):
dependencies:
css-declaration-sorter: 6.4.1(postcss@8.4.41)
@@ -16304,13 +16855,16 @@ snapshots:
dependencies:
css-tree: 2.2.1
- cssom@0.3.8: {}
+ cssom@0.3.8:
+ optional: true
- cssom@0.5.0: {}
+ cssom@0.5.0:
+ optional: true
cssstyle@2.3.0:
dependencies:
cssom: 0.3.8
+ optional: true
csstype@3.1.3: {}
@@ -16332,6 +16886,7 @@ snapshots:
abab: 2.0.6
whatwg-mimetype: 3.0.0
whatwg-url: 11.0.0
+ optional: true
data-view-buffer@1.0.1:
dependencies:
@@ -16371,7 +16926,8 @@ snapshots:
decamelize@1.2.0: {}
- decimal.js@10.4.3: {}
+ decimal.js@10.4.3:
+ optional: true
decode-named-character-reference@1.0.2:
dependencies:
@@ -16387,6 +16943,8 @@ snapshots:
dependencies:
type-detect: 4.1.0
+ deep-eql@5.0.2: {}
+
deep-equal@2.2.3:
dependencies:
array-buffer-byte-length: 1.0.1
@@ -16457,6 +17015,11 @@ snapshots:
dequal@2.0.3: {}
+ des.js@1.1.0:
+ dependencies:
+ inherits: 2.0.4
+ minimalistic-assert: 1.0.1
+
destroy@1.2.0: {}
detect-file@1.0.0: {}
@@ -16475,7 +17038,8 @@ snapshots:
diff-sequences@29.6.3: {}
- diff@4.0.2: {}
+ diff@4.0.2:
+ optional: true
diff@5.2.0: {}
@@ -16483,6 +17047,12 @@ snapshots:
dependencies:
htmlparser2: 3.10.1
+ diffie-hellman@5.0.3:
+ dependencies:
+ bn.js: 4.12.0
+ miller-rabin: 4.0.1
+ randombytes: 2.1.0
+
dir-glob@3.0.1:
dependencies:
path-type: 4.0.0
@@ -16523,6 +17093,8 @@ snapshots:
domhandler: 5.0.3
entities: 4.5.0
+ domain-browser@4.23.0: {}
+
domelementtype@1.3.1: {}
domelementtype@2.3.0: {}
@@ -16530,6 +17102,7 @@ snapshots:
domexception@4.0.0:
dependencies:
webidl-conversions: 7.0.0
+ optional: true
domhandler@2.4.2:
dependencies:
@@ -16574,9 +17147,20 @@ snapshots:
ejs@3.1.10:
dependencies:
jake: 10.9.2
+ optional: true
electron-to-chromium@1.5.6: {}
+ elliptic@6.5.7:
+ dependencies:
+ bn.js: 4.12.0
+ brorand: 1.1.0
+ hash.js: 1.1.7
+ hmac-drbg: 1.0.1
+ inherits: 2.0.4
+ minimalistic-assert: 1.0.1
+ minimalistic-crypto-utils: 1.0.1
+
emittery@0.13.1: {}
emoji-regex@10.3.0: {}
@@ -16924,17 +17508,6 @@ snapshots:
- eslint-import-resolver-webpack
- supports-color
- eslint-plugin-jest@27.9.0(@typescript-eslint/eslint-plugin@8.1.0(@typescript-eslint/parser@8.1.0(eslint@8.57.0)(typescript@5.5.4))(eslint@8.57.0)(typescript@5.5.4))(eslint@8.57.0)(jest@29.7.0(@types/node@20.14.15)(ts-node@10.9.2(@swc/core@1.7.10(@swc/helpers@0.5.11))(@types/node@20.14.15)(typescript@5.5.4)))(typescript@5.5.4):
- dependencies:
- '@typescript-eslint/utils': 5.62.0(eslint@8.57.0)(typescript@5.5.4)
- eslint: 8.57.0
- optionalDependencies:
- '@typescript-eslint/eslint-plugin': 8.1.0(@typescript-eslint/parser@8.1.0(eslint@8.57.0)(typescript@5.5.4))(eslint@8.57.0)(typescript@5.5.4)
- jest: 29.7.0(@types/node@20.14.15)(babel-plugin-macros@3.1.0)(ts-node@10.9.2(@swc/core@1.7.10(@swc/helpers@0.5.11))(@types/node@20.14.15)(typescript@5.5.4))
- transitivePeerDependencies:
- - supports-color
- - typescript
-
eslint-plugin-jsx-a11y@6.9.0(eslint@8.57.0):
dependencies:
aria-query: 5.1.3
@@ -17019,6 +17592,17 @@ snapshots:
- supports-color
- typescript
+ eslint-plugin-vitest@0.5.4(@typescript-eslint/eslint-plugin@8.1.0(@typescript-eslint/parser@8.1.0(eslint@8.57.0)(typescript@5.5.4))(eslint@8.57.0)(typescript@5.5.4))(eslint@8.57.0)(typescript@5.5.4)(vitest@2.0.5(@types/node@20.14.15)(jsdom@20.0.3)(less@4.2.0)(sass@1.77.8)(stylus@0.62.0)(terser@5.31.5)):
+ dependencies:
+ '@typescript-eslint/utils': 7.18.0(eslint@8.57.0)(typescript@5.5.4)
+ eslint: 8.57.0
+ optionalDependencies:
+ '@typescript-eslint/eslint-plugin': 8.1.0(@typescript-eslint/parser@8.1.0(eslint@8.57.0)(typescript@5.5.4))(eslint@8.57.0)(typescript@5.5.4)
+ vitest: 2.0.5(@types/node@20.14.15)(jsdom@20.0.3)(less@4.2.0)(sass@1.77.8)(stylus@0.62.0)(terser@5.31.5)
+ transitivePeerDependencies:
+ - supports-color
+ - typescript
+
eslint-scope@5.1.1:
dependencies:
esrecurse: 4.3.0
@@ -17169,6 +17753,13 @@ snapshots:
eventemitter3@4.0.7: {}
+ events@3.3.0: {}
+
+ evp_bytestokey@1.0.3:
+ dependencies:
+ md5.js: 1.3.5
+ safe-buffer: 5.2.1
+
execa@5.1.1:
dependencies:
cross-spawn: 7.0.3
@@ -17309,6 +17900,7 @@ snapshots:
filelist@1.0.4:
dependencies:
minimatch: 5.1.6
+ optional: true
fill-range@7.1.1:
dependencies:
@@ -17736,6 +18328,22 @@ snapshots:
dependencies:
has-symbols: 1.0.3
+ hash-base@3.0.4:
+ dependencies:
+ inherits: 2.0.4
+ safe-buffer: 5.2.1
+
+ hash-base@3.1.0:
+ dependencies:
+ inherits: 2.0.4
+ readable-stream: 3.6.2
+ safe-buffer: 5.2.1
+
+ hash.js@1.1.7:
+ dependencies:
+ inherits: 2.0.4
+ minimalistic-assert: 1.0.1
+
hasha@5.2.2:
dependencies:
is-stream: 2.0.1
@@ -17770,6 +18378,12 @@ snapshots:
highlight.js@11.10.0: {}
+ hmac-drbg@1.0.1:
+ dependencies:
+ hash.js: 1.1.7
+ minimalistic-assert: 1.0.1
+ minimalistic-crypto-utils: 1.0.1
+
hoist-non-react-statics@3.3.2:
dependencies:
react-is: 16.13.1
@@ -17785,6 +18399,7 @@ snapshots:
html-encoding-sniffer@3.0.0:
dependencies:
whatwg-encoding: 2.0.0
+ optional: true
html-escaper@2.0.2: {}
@@ -17814,6 +18429,9 @@ snapshots:
debug: 4.3.6
transitivePeerDependencies:
- supports-color
+ optional: true
+
+ https-browserify@1.0.0: {}
https-proxy-agent@5.0.1:
dependencies:
@@ -17821,6 +18439,7 @@ snapshots:
debug: 4.3.6
transitivePeerDependencies:
- supports-color
+ optional: true
human-id@1.0.2: {}
@@ -17835,6 +18454,7 @@ snapshots:
iconv-lite@0.6.3:
dependencies:
safer-buffer: 2.1.2
+ optional: true
icss-replace-symbols@1.1.0: {}
@@ -18046,6 +18666,11 @@ snapshots:
is-module@1.0.0: {}
+ is-nan@1.3.2:
+ dependencies:
+ call-bind: 1.0.7
+ define-properties: 1.2.1
+
is-negative-zero@2.0.3: {}
is-node-process@1.2.0: {}
@@ -18070,7 +18695,8 @@ snapshots:
is-plain-object@5.0.0: {}
- is-potential-custom-element-name@1.0.1: {}
+ is-potential-custom-element-name@1.0.1:
+ optional: true
is-reference@1.2.1:
dependencies:
@@ -18141,6 +18767,8 @@ snapshots:
is-windows@1.0.2: {}
+ isarray@1.0.0: {}
+
isarray@2.0.5: {}
isbinaryfile@5.0.2: {}
@@ -18153,6 +18781,8 @@ snapshots:
isomorphic-resolve@1.0.0: {}
+ isomorphic-timers-promises@1.0.1: {}
+
istanbul-lib-coverage@3.2.2: {}
istanbul-lib-hook@3.0.0:
@@ -18242,6 +18872,7 @@ snapshots:
chalk: 4.1.2
filelist: 1.0.4
minimatch: 3.1.2
+ optional: true
jest-axe@9.0.0:
dependencies:
@@ -18250,11 +18881,6 @@ snapshots:
jest-matcher-utils: 29.2.2
lodash.merge: 4.6.2
- jest-canvas-mock@2.5.2:
- dependencies:
- cssfontparser: 1.2.1
- moo-color: 1.0.3
-
jest-changed-files@29.7.0:
dependencies:
execa: 5.1.1
@@ -18356,21 +18982,6 @@ snapshots:
jest-util: 29.7.0
pretty-format: 29.7.0
- jest-environment-jsdom@29.7.0:
- dependencies:
- '@jest/environment': 29.7.0
- '@jest/fake-timers': 29.7.0
- '@jest/types': 29.6.3
- '@types/jsdom': 20.0.1
- '@types/node': 20.14.15
- jest-mock: 29.7.0
- jest-util: 29.7.0
- jsdom: 20.0.3
- transitivePeerDependencies:
- - bufferutil
- - supports-color
- - utf-8-validate
-
jest-environment-node@29.7.0:
dependencies:
'@jest/environment': 29.7.0
@@ -18581,8 +19192,6 @@ snapshots:
transitivePeerDependencies:
- supports-color
- jest-static-stubs@0.0.1: {}
-
jest-util@29.7.0:
dependencies:
'@jest/types': 29.6.3
@@ -18722,6 +19331,7 @@ snapshots:
- bufferutil
- supports-color
- utf-8-validate
+ optional: true
jsesc@0.5.0: {}
@@ -18911,6 +19521,8 @@ snapshots:
dependencies:
p-locate: 5.0.0
+ lodash-es@4.17.21: {}
+
lodash.camelcase@4.3.0: {}
lodash.debounce@4.0.8: {}
@@ -18964,6 +19576,10 @@ snapshots:
dependencies:
get-func-name: 2.0.2
+ loupe@3.1.1:
+ dependencies:
+ get-func-name: 2.0.2
+
lower-case@2.0.2:
dependencies:
tslib: 2.6.3
@@ -19008,7 +19624,8 @@ snapshots:
dependencies:
semver: 7.6.3
- make-error@1.3.6: {}
+ make-error@1.3.6:
+ optional: true
make-iterator@1.0.1:
dependencies:
@@ -19028,6 +19645,12 @@ snapshots:
mathml-tag-names@2.1.3: {}
+ md5.js@1.3.5:
+ dependencies:
+ hash-base: 3.1.0
+ inherits: 2.0.4
+ safe-buffer: 5.2.1
+
mdast-util-from-markdown@0.8.5:
dependencies:
'@types/mdast': 3.0.15
@@ -19375,6 +19998,11 @@ snapshots:
braces: 3.0.3
picomatch: 2.3.1
+ miller-rabin@4.0.1:
+ dependencies:
+ bn.js: 4.12.0
+ brorand: 1.1.0
+
mime-db@1.52.0: {}
mime-types@2.1.35:
@@ -19389,6 +20017,10 @@ snapshots:
min-indent@1.0.1: {}
+ minimalistic-assert@1.0.1: {}
+
+ minimalistic-crypto-utils@1.0.1: {}
+
minimatch@10.0.1:
dependencies:
brace-expansion: 2.0.1
@@ -19400,6 +20032,7 @@ snapshots:
minimatch@5.1.6:
dependencies:
brace-expansion: 2.0.1
+ optional: true
minimatch@9.0.3:
dependencies:
@@ -19440,10 +20073,6 @@ snapshots:
pkg-types: 1.1.3
ufo: 1.5.4
- moo-color@1.0.3:
- dependencies:
- color-name: 1.1.4
-
mri@1.2.0: {}
ms@2.0.0: {}
@@ -19593,6 +20222,36 @@ snapshots:
node-releases@2.0.18: {}
+ node-stdlib-browser@1.2.0:
+ dependencies:
+ assert: 2.1.0
+ browser-resolve: 2.0.0
+ browserify-zlib: 0.2.0
+ buffer: 5.7.1
+ console-browserify: 1.2.0
+ constants-browserify: 1.0.0
+ create-require: 1.1.1
+ crypto-browserify: 3.12.0
+ domain-browser: 4.23.0
+ events: 3.3.0
+ https-browserify: 1.0.0
+ isomorphic-timers-promises: 1.0.1
+ os-browserify: 0.3.0
+ path-browserify: 1.0.1
+ pkg-dir: 5.0.0
+ process: 0.11.10
+ punycode: 1.4.1
+ querystring-es3: 0.2.1
+ readable-stream: 3.6.2
+ stream-browserify: 3.0.0
+ stream-http: 3.2.0
+ string_decoder: 1.3.0
+ timers-browserify: 2.0.12
+ tty-browserify: 0.0.1
+ url: 0.11.4
+ util: 0.12.5
+ vm-browserify: 1.1.2
+
nopt@7.2.1:
dependencies:
abbrev: 2.0.0
@@ -19645,7 +20304,8 @@ snapshots:
number-is-nan@1.0.1: {}
- nwsapi@2.2.12: {}
+ nwsapi@2.2.12:
+ optional: true
nyc@15.1.0:
dependencies:
@@ -19822,6 +20482,8 @@ snapshots:
orderedmap@2.1.1: {}
+ os-browserify@0.3.0: {}
+
os-homedir@1.0.2: {}
os-locale@1.4.0:
@@ -19899,6 +20561,8 @@ snapshots:
package-json-from-dist@1.0.0: {}
+ pako@1.0.11: {}
+
param-case@3.0.4:
dependencies:
dot-case: 3.0.4
@@ -19908,6 +20572,15 @@ snapshots:
dependencies:
callsites: 3.1.0
+ parse-asn1@5.1.7:
+ dependencies:
+ asn1.js: 4.10.1
+ browserify-aes: 1.2.0
+ evp_bytestokey: 1.0.3
+ hash-base: 3.0.4
+ pbkdf2: 3.1.2
+ safe-buffer: 5.2.1
+
parse-entities@2.0.0:
dependencies:
character-entities: 1.2.4
@@ -19957,6 +20630,7 @@ snapshots:
parse5@7.1.2:
dependencies:
entities: 4.5.0
+ optional: true
parseurl@1.3.3: {}
@@ -19965,6 +20639,8 @@ snapshots:
no-case: 3.0.4
tslib: 2.6.3
+ path-browserify@1.0.1: {}
+
path-case@3.0.4:
dependencies:
dot-case: 3.0.4
@@ -20015,6 +20691,16 @@ snapshots:
pathval@1.1.1: {}
+ pathval@2.0.0: {}
+
+ pbkdf2@3.1.2:
+ dependencies:
+ create-hash: 1.2.0
+ create-hmac: 1.1.7
+ ripemd160: 2.0.2
+ safe-buffer: 5.2.1
+ sha.js: 2.4.11
+
picocolors@1.0.1: {}
picomatch@2.3.1: {}
@@ -20037,6 +20723,10 @@ snapshots:
dependencies:
find-up: 4.1.0
+ pkg-dir@5.0.0:
+ dependencies:
+ find-up: 5.0.0
+
pkg-types@1.1.3:
dependencies:
confbox: 0.1.7
@@ -20785,6 +21475,8 @@ snapshots:
proc-log@4.2.0: {}
+ process-nextick-args@2.0.1: {}
+
process-on-spawn@1.0.0:
dependencies:
fromentries: 1.3.2
@@ -20881,7 +21573,19 @@ snapshots:
pseudomap@1.0.2: {}
- psl@1.9.0: {}
+ psl@1.9.0:
+ optional: true
+
+ public-encrypt@4.0.3:
+ dependencies:
+ bn.js: 4.12.0
+ browserify-rsa: 4.1.0
+ create-hash: 1.2.0
+ parse-asn1: 5.1.7
+ randombytes: 2.1.0
+ safe-buffer: 5.2.1
+
+ punycode@1.4.1: {}
punycode@2.3.1: {}
@@ -20891,18 +21595,33 @@ snapshots:
dependencies:
side-channel: 1.0.6
+ qs@6.13.0:
+ dependencies:
+ side-channel: 1.0.6
+
query-string@9.1.0:
dependencies:
decode-uri-component: 0.4.1
filter-obj: 5.1.0
split-on-first: 3.0.0
+ querystring-es3@0.2.1: {}
+
querystring@0.2.1: {}
querystringify@2.2.0: {}
queue-microtask@1.2.3: {}
+ randombytes@2.1.0:
+ dependencies:
+ safe-buffer: 5.2.1
+
+ randomfill@1.0.4:
+ dependencies:
+ randombytes: 2.1.0
+ safe-buffer: 5.2.1
+
range-parser@1.2.1: {}
raw-body@2.5.2:
@@ -21225,6 +21944,16 @@ snapshots:
pify: 4.0.1
strip-bom: 3.0.0
+ readable-stream@2.3.8:
+ dependencies:
+ core-util-is: 1.0.3
+ inherits: 2.0.4
+ isarray: 1.0.0
+ process-nextick-args: 2.0.1
+ safe-buffer: 5.1.2
+ string_decoder: 1.1.1
+ util-deprecate: 1.0.2
+
readable-stream@3.6.2:
dependencies:
inherits: 2.0.4
@@ -21414,6 +22143,11 @@ snapshots:
glob: 11.0.0
package-json-from-dist: 1.0.0
+ ripemd160@2.0.2:
+ dependencies:
+ hash-base: 3.1.0
+ inherits: 2.0.4
+
rollup-plugin-ignore@1.0.10: {}
rollup-plugin-node-externals@7.1.2(rollup@4.20.0):
@@ -21488,6 +22222,8 @@ snapshots:
has-symbols: 1.0.3
isarray: 2.0.5
+ safe-buffer@5.1.2: {}
+
safe-buffer@5.2.1: {}
safe-identifier@0.4.2: {}
@@ -21515,6 +22251,7 @@ snapshots:
saxes@6.0.0:
dependencies:
xmlchars: 2.2.0
+ optional: true
scheduler@0.23.2:
dependencies:
@@ -21579,8 +22316,15 @@ snapshots:
functions-have-names: 1.2.3
has-property-descriptors: 1.0.2
+ setimmediate@1.0.5: {}
+
setprototypeof@1.2.0: {}
+ sha.js@2.4.11:
+ dependencies:
+ inherits: 2.0.4
+ safe-buffer: 5.2.1
+
shallow-clone@0.1.2:
dependencies:
is-extendable: 0.1.1
@@ -21611,6 +22355,8 @@ snapshots:
get-intrinsic: 1.2.4
object-inspect: 1.13.2
+ siginfo@2.0.0: {}
+
signal-exit@3.0.7: {}
signal-exit@4.1.0: {}
@@ -21719,8 +22465,12 @@ snapshots:
dependencies:
escape-string-regexp: 2.0.0
+ stackback@0.0.2: {}
+
statuses@2.0.1: {}
+ std-env@3.7.0: {}
+
stdin-discarder@0.2.2: {}
stop-iteration-iterator@1.0.0:
@@ -21773,6 +22523,18 @@ snapshots:
- supports-color
- utf-8-validate
+ stream-browserify@3.0.0:
+ dependencies:
+ inherits: 2.0.4
+ readable-stream: 3.6.2
+
+ stream-http@3.2.0:
+ dependencies:
+ builtin-status-codes: 3.0.0
+ inherits: 2.0.4
+ readable-stream: 3.6.2
+ xtend: 4.0.2
+
streamsearch@1.1.0:
optional: true
@@ -21868,6 +22630,10 @@ snapshots:
define-properties: 1.2.1
es-object-atoms: 1.0.0
+ string_decoder@1.1.1:
+ dependencies:
+ safe-buffer: 5.1.2
+
string_decoder@1.3.0:
dependencies:
safe-buffer: 5.2.1
@@ -22106,7 +22872,8 @@ snapshots:
transitivePeerDependencies:
- openapi-types
- symbol-tree@3.2.4: {}
+ symbol-tree@3.2.4:
+ optional: true
synckit@0.9.1:
dependencies:
@@ -22204,10 +22971,22 @@ snapshots:
dependencies:
any-promise: 1.3.0
+ timers-browserify@2.0.12:
+ dependencies:
+ setimmediate: 1.0.5
+
tiny-invariant@1.3.3: {}
+ tinybench@2.9.0: {}
+
+ tinypool@1.0.1: {}
+
+ tinyrainbow@1.2.0: {}
+
tinyspy@2.2.1: {}
+ tinyspy@3.0.0: {}
+
title-case@3.0.3:
dependencies:
tslib: 2.6.3
@@ -22232,12 +23011,14 @@ snapshots:
punycode: 2.3.1
universalify: 0.2.0
url-parse: 1.5.10
+ optional: true
tr46@0.0.3: {}
tr46@3.0.0:
dependencies:
punycode: 2.3.1
+ optional: true
traverse@0.6.9:
dependencies:
@@ -22276,6 +23057,7 @@ snapshots:
'@jest/types': 29.6.3
babel-jest: 29.7.0(@babel/core@7.25.2)
esbuild: 0.23.0
+ optional: true
ts-node@10.9.2(@swc/core@1.7.10(@swc/helpers@0.5.11))(@types/node@20.14.15)(typescript@5.5.4):
dependencies:
@@ -22296,6 +23078,7 @@ snapshots:
yn: 3.1.1
optionalDependencies:
'@swc/core': 1.7.10(@swc/helpers@0.5.11)
+ optional: true
ts-patch@3.2.1:
dependencies:
@@ -22337,6 +23120,8 @@ snapshots:
optionalDependencies:
fsevents: 2.3.3
+ tty-browserify@0.0.1: {}
+
turbo-darwin-64@2.0.14:
optional: true
@@ -22563,7 +23348,8 @@ snapshots:
universalify@0.1.2: {}
- universalify@0.2.0: {}
+ universalify@0.2.0:
+ optional: true
universalify@2.0.1: {}
@@ -22601,6 +23387,11 @@ snapshots:
querystringify: 2.2.0
requires-port: 1.0.0
+ url@0.11.4:
+ dependencies:
+ punycode: 1.4.1
+ qs: 6.13.0
+
use-callback-ref@1.3.2(@types/react@18.3.4)(react@18.3.1):
dependencies:
react: 18.3.1
@@ -22659,7 +23450,8 @@ snapshots:
kleur: 4.1.5
sade: 1.8.1
- v8-compile-cache-lib@3.0.1: {}
+ v8-compile-cache-lib@3.0.1:
+ optional: true
v8-to-istanbul@9.3.0:
dependencies:
@@ -22712,6 +23504,32 @@ snapshots:
unist-util-stringify-position: 4.0.0
vfile-message: 4.0.2
+ vite-node@2.0.5(@types/node@20.14.15)(less@4.2.0)(sass@1.77.8)(stylus@0.62.0)(terser@5.31.5):
+ dependencies:
+ cac: 6.7.14
+ debug: 4.3.6
+ pathe: 1.1.2
+ tinyrainbow: 1.2.0
+ vite: 5.4.2(@types/node@20.14.15)(less@4.2.0)(sass@1.77.8)(stylus@0.62.0)(terser@5.31.5)
+ transitivePeerDependencies:
+ - '@types/node'
+ - less
+ - lightningcss
+ - sass
+ - sass-embedded
+ - stylus
+ - sugarss
+ - supports-color
+ - terser
+
+ vite-plugin-node-polyfills@0.22.0(rollup@4.20.0)(vite@5.4.2(@types/node@20.14.15)(less@4.2.0)(sass@1.77.8)(stylus@0.62.0)(terser@5.31.5)):
+ dependencies:
+ '@rollup/plugin-inject': 5.0.5(rollup@4.20.0)
+ node-stdlib-browser: 1.2.0
+ vite: 5.4.2(@types/node@20.14.15)(less@4.2.0)(sass@1.77.8)(stylus@0.62.0)(terser@5.31.5)
+ transitivePeerDependencies:
+ - rollup
+
vite@5.4.2(@types/node@20.14.15)(less@4.2.0)(sass@1.77.8)(stylus@0.62.0)(terser@5.31.5):
dependencies:
esbuild: 0.21.5
@@ -22725,11 +23543,58 @@ snapshots:
stylus: 0.62.0
terser: 5.31.5
+ vitest-axe@0.1.0(vitest@2.0.5(@types/node@20.14.15)(jsdom@20.0.3)(less@4.2.0)(sass@1.77.8)(stylus@0.62.0)(terser@5.31.5)):
+ dependencies:
+ aria-query: 5.3.0
+ axe-core: 4.10.0
+ chalk: 5.3.0
+ dom-accessibility-api: 0.5.16
+ lodash-es: 4.17.21
+ redent: 3.0.0
+ vitest: 2.0.5(@types/node@20.14.15)(jsdom@20.0.3)(less@4.2.0)(sass@1.77.8)(stylus@0.62.0)(terser@5.31.5)
+
+ vitest@2.0.5(@types/node@20.14.15)(jsdom@20.0.3)(less@4.2.0)(sass@1.77.8)(stylus@0.62.0)(terser@5.31.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.6
+ execa: 8.0.1
+ magic-string: 0.30.11
+ pathe: 1.1.2
+ std-env: 3.7.0
+ tinybench: 2.9.0
+ tinypool: 1.0.1
+ tinyrainbow: 1.2.0
+ vite: 5.4.2(@types/node@20.14.15)(less@4.2.0)(sass@1.77.8)(stylus@0.62.0)(terser@5.31.5)
+ vite-node: 2.0.5(@types/node@20.14.15)(less@4.2.0)(sass@1.77.8)(stylus@0.62.0)(terser@5.31.5)
+ why-is-node-running: 2.3.0
+ optionalDependencies:
+ '@types/node': 20.14.15
+ jsdom: 20.0.3
+ transitivePeerDependencies:
+ - less
+ - lightningcss
+ - sass
+ - sass-embedded
+ - stylus
+ - sugarss
+ - supports-color
+ - terser
+
+ vm-browserify@1.1.2: {}
+
w3c-keyname@2.2.8: {}
w3c-xmlserializer@4.0.0:
dependencies:
xml-name-validator: 4.0.0
+ optional: true
wait-on@7.2.0:
dependencies:
@@ -22767,7 +23632,8 @@ snapshots:
webidl-conversions@3.0.1: {}
- webidl-conversions@7.0.0: {}
+ webidl-conversions@7.0.0:
+ optional: true
webpack-sources@3.2.3: {}
@@ -22776,13 +23642,16 @@ snapshots:
whatwg-encoding@2.0.0:
dependencies:
iconv-lite: 0.6.3
+ optional: true
- whatwg-mimetype@3.0.0: {}
+ whatwg-mimetype@3.0.0:
+ optional: true
whatwg-url@11.0.0:
dependencies:
tr46: 3.0.0
webidl-conversions: 7.0.0
+ optional: true
whatwg-url@5.0.0:
dependencies:
@@ -22846,6 +23715,11 @@ snapshots:
dependencies:
isexe: 3.1.1
+ why-is-node-running@2.3.0:
+ dependencies:
+ siginfo: 2.0.0
+ stackback: 0.0.2
+
win-release@1.1.1:
dependencies:
semver: 5.7.2
@@ -22906,13 +23780,17 @@ snapshots:
ws@8.18.0: {}
- xml-name-validator@4.0.0: {}
+ xml-name-validator@4.0.0:
+ optional: true
xml@1.0.1: {}
xmlbuilder@15.1.1: {}
- xmlchars@2.2.0: {}
+ xmlchars@2.2.0:
+ optional: true
+
+ xtend@4.0.2: {}
y18n@3.2.2: {}
@@ -22971,7 +23849,8 @@ snapshots:
window-size: 0.1.4
y18n: 3.2.2
- yn@3.1.1: {}
+ yn@3.1.1:
+ optional: true
yocto-queue@0.1.0: {}
diff --git a/tsconfig.json b/tsconfig.json
index 31bef3320d2..3ae2769bdc3 100644
--- a/tsconfig.json
+++ b/tsconfig.json
@@ -19,8 +19,7 @@
"~tailwind/*": ["./packages/tailwind/src/*"],
"~tests": ["./packages/components/__tests__/index"],
"~tests/*": ["./packages/components/__tests__/*"]
- },
- "types": ["@testing-library/jest-dom"]
+ }
},
"exclude": ["**/node_modules"]
}
diff --git a/turbo.json b/turbo.json
index 790eaafdf64..00633c36071 100644
--- a/turbo.json
+++ b/turbo.json
@@ -16,8 +16,10 @@
"lint:ts": {
"dependsOn": ["^build"]
},
- "test": {},
- "test:ci": {},
+ "test": {
+ "inputs": ["packages/**"],
+ "cache": false
+ },
"clean": {
"cache": false
},
@@ -44,6 +46,11 @@
"outputs": ["docs/storybook-static/**"],
"cache": false
},
+ "@docs/storybook#test:storybook": {
+ "dependsOn": ["^build", "build:tailwind"],
+ "outputs": ["docs/storybook-static/**"],
+ "cache": false
+ },
"@kaizen/components#build": {
"dependsOn": [
"@kaizen/design-tokens#build",
diff --git a/vite.config.ts b/vite.config.ts
new file mode 100644
index 00000000000..5ad29bf8c2d
--- /dev/null
+++ b/vite.config.ts
@@ -0,0 +1,46 @@
+/** @type {import('vite').UserConfig} */
+import path from "path"
+import { mergeAlias } from "vite"
+
+export default {
+ resolve: {
+ alias: mergeAlias(
+ [
+ {
+ // this is required for the SCSS modules
+ find: /^~(.*)$/,
+ replacement: "$1",
+ },
+ {
+ // monorepo workspace aliases
+ find: /^\@kaizen(.*)$/,
+ replacement: path.resolve(__dirname, "./packages$1"),
+ },
+ ],
+ {
+ "~storybook": path.resolve(__dirname, "./docs"),
+ "~components": path.resolve(__dirname, "./packages/components/src"),
+ "~tests": path.resolve(__dirname, "./packages/components/__tests__"),
+ "~design-tokens": path.resolve(
+ __dirname,
+ "./packages/design-tokens/src"
+ ),
+ "~tailwind": path.resolve(__dirname, "./packages/tailwind/src"),
+ // i18n-react-intl package attempts to import locales from this path.
+ // When rollup attempts to import from the 'find' path, it will be
+ // redirected to import from the replacement path (Same as KAIO rollup config).
+ "__@cultureamp/i18n-react-intl/locales": path.resolve(
+ __dirname,
+ "./packages/components/locales"
+ ),
+ }
+ ),
+ },
+ test: {
+ // TODO: Remove this when @HeartSquared fixes icons
+ include: ["**/*.spec.ts?(x)", "!**/svgo.spec.ts"],
+ environment: "jsdom",
+ globals: true,
+ setupFiles: path.resolve(__dirname, "./vitest.setup.ts"),
+ },
+}
diff --git a/vitest.setup.ts b/vitest.setup.ts
new file mode 100644
index 00000000000..136df106c1a
--- /dev/null
+++ b/vitest.setup.ts
@@ -0,0 +1,19 @@
+import * as JestDomMatchers from "@testing-library/jest-dom/matchers"
+import { cleanup } from "@testing-library/react"
+import { expect, afterEach, beforeEach } from "vitest"
+import "vitest-axe/extend-expect"
+import { reactIntlMock } from "~tests"
+
+expect.extend(JestDomMatchers)
+
+// eslint-disable-next-line vitest/require-top-level-describe
+beforeEach(() => {
+ reactIntlMock()
+})
+
+// eslint-disable-next-line vitest/require-top-level-describe
+afterEach(() => {
+ cleanup()
+})
+
+process.env.TZ = "UTC"