diff --git a/js/apps/admin-ui/package.json b/js/apps/admin-ui/package.json
index 96170f27ec..a0ef7bf476 100644
--- a/js/apps/admin-ui/package.json
+++ b/js/apps/admin-ui/package.json
@@ -109,6 +109,6 @@
"uuid": "^9.0.1",
"vite": "^5.0.11",
"vite-plugin-checker": "^0.6.2",
- "vitest": "^1.1.1"
+ "vitest": "^1.1.3"
}
}
diff --git a/js/apps/admin-ui/src/components/confirm-dialog/ConfirmDialog.test.tsx b/js/apps/admin-ui/src/components/confirm-dialog/ConfirmDialog.test.tsx
deleted file mode 100644
index 84db9306bd..0000000000
--- a/js/apps/admin-ui/src/components/confirm-dialog/ConfirmDialog.test.tsx
+++ /dev/null
@@ -1,39 +0,0 @@
-/**
- * @vitest-environment jsdom
- */
-import { fireEvent, render, screen } from "@testing-library/react";
-import { describe, expect, it, vi } from "vitest";
-import { useConfirmDialog } from "./ConfirmDialog";
-
-describe("ConfirmDialog", () => {
- it("renders a simple confirm dialog", () => {
- const onConfirm = vi.fn();
- const Test = () => {
- const [toggle, ConfirmDialog] = useConfirmDialog({
- titleKey: "Delete app02?",
- messageKey:
- "If you delete this client, all associated data will be removed.",
- continueButtonLabel: "Delete",
- onConfirm: onConfirm,
- });
-
- return (
- <>
-
-
- >
- );
- };
-
- render();
- fireEvent.click(screen.getByTestId("show"));
-
- const confirmButton = screen.getByTestId("confirm");
- expect(confirmButton).toBeInTheDocument();
-
- fireEvent.click(confirmButton);
- expect(onConfirm).toBeCalled();
- });
-});
diff --git a/js/apps/admin-ui/vite.config.ts b/js/apps/admin-ui/vite.config.ts
index cb40aebd4b..9458bb373e 100644
--- a/js/apps/admin-ui/vite.config.ts
+++ b/js/apps/admin-ui/vite.config.ts
@@ -19,11 +19,6 @@ export default defineConfig({
},
plugins: [react(), checker({ typescript: true })],
test: {
- setupFiles: "vitest.setup.ts",
watch: false,
- deps: {
- // Ensure '.mjs' files are used for '@patternfly/react-styles'.
- inline: [/@patternfly\/react-styles/],
- },
},
});
diff --git a/js/apps/admin-ui/vitest.setup.ts b/js/apps/admin-ui/vitest.setup.ts
deleted file mode 100644
index 5732f04aa9..0000000000
--- a/js/apps/admin-ui/vitest.setup.ts
+++ /dev/null
@@ -1,14 +0,0 @@
-import "@testing-library/jest-dom/vitest";
-import { use } from "i18next";
-import { initReactI18next } from "react-i18next";
-
-use(initReactI18next).init({
- lng: "en",
- fallbackLng: "en",
-
- // have a common namespace used around the full app
- ns: ["translations"],
- defaultNS: "translations",
-
- resources: { en: { translations: {} } },
-});
diff --git a/js/libs/ui-shared/package.json b/js/libs/ui-shared/package.json
index 57652bdfee..413d1fe414 100644
--- a/js/libs/ui-shared/package.json
+++ b/js/libs/ui-shared/package.json
@@ -60,6 +60,6 @@
"vite-plugin-checker": "^0.6.2",
"vite-plugin-dts": "^3.7.0",
"vite-plugin-lib-inject-css": "^1.3.0",
- "vitest": "^1.1.1"
+ "vitest": "^1.1.3"
}
}
diff --git a/js/pnpm-lock.yaml b/js/pnpm-lock.yaml
index dfd8b10948..6545a69ab8 100644
--- a/js/pnpm-lock.yaml
+++ b/js/pnpm-lock.yaml
@@ -231,7 +231,7 @@ importers:
version: 10.0.1(cypress@13.6.2)
'@testing-library/jest-dom':
specifier: ^6.2.0
- version: 6.2.0(vitest@1.1.1)
+ version: 6.2.0(vitest@1.1.3)
'@testing-library/react':
specifier: ^14.1.2
version: 14.1.2(react-dom@18.2.0)(react@18.2.0)
@@ -284,8 +284,8 @@ importers:
specifier: ^0.6.2
version: 0.6.2(eslint@8.56.0)(typescript@5.3.3)(vite@5.0.11)
vitest:
- specifier: ^1.1.1
- version: 1.1.1(@types/node@20.10.8)(jsdom@23.2.0)(lightningcss@1.22.1)
+ specifier: ^1.1.3
+ version: 1.1.3(@types/node@20.10.8)(jsdom@23.2.0)(lightningcss@1.22.1)
apps/keycloak-server:
dependencies:
@@ -483,8 +483,8 @@ importers:
specifier: ^1.3.0
version: 1.3.0(vite@5.0.11)
vitest:
- specifier: ^1.1.1
- version: 1.1.1(@types/node@20.10.8)(jsdom@23.2.0)(lightningcss@1.22.1)
+ specifier: ^1.1.3
+ version: 1.1.3(@types/node@20.10.8)(jsdom@23.2.0)(lightningcss@1.22.1)
packages:
@@ -1805,7 +1805,7 @@ packages:
pretty-format: 27.5.1
dev: true
- /@testing-library/jest-dom@6.2.0(vitest@1.1.1):
+ /@testing-library/jest-dom@6.2.0(vitest@1.1.3):
resolution: {integrity: sha512-+BVQlJ9cmEn5RDMUS8c2+TU6giLvzaHZ8sU/x0Jj7fk+6/46wPdwlgOPcpxS17CjcanBi/3VmGMqVr2rmbUmNw==}
engines: {node: '>=14', npm: '>=6', yarn: '>=1'}
peerDependencies:
@@ -1831,7 +1831,7 @@ packages:
dom-accessibility-api: 0.6.3
lodash: 4.17.21
redent: 3.0.0
- vitest: 1.1.1(@types/node@20.10.8)(jsdom@23.2.0)(lightningcss@1.22.1)
+ vitest: 1.1.3(@types/node@20.10.8)(jsdom@23.2.0)(lightningcss@1.22.1)
dev: true
/@testing-library/react@14.1.2(react-dom@18.2.0)(react@18.2.0):
@@ -2323,40 +2323,41 @@ packages:
- '@swc/helpers'
dev: true
- /@vitest/expect@1.1.1:
- resolution: {integrity: sha512-Qpw01C2Hyb3085jBkOJLQ7HRX0Ncnh2qV4p+xWmmhcIUlMykUF69zsnZ1vPmAjZpomw9+5tWEGOQ0GTfR8U+kA==}
+ /@vitest/expect@1.1.3:
+ resolution: {integrity: sha512-MnJqsKc1Ko04lksF9XoRJza0bGGwTtqfbyrsYv5on4rcEkdo+QgUdITenBQBUltKzdxW7K3rWh+nXRULwsdaVg==}
dependencies:
- '@vitest/spy': 1.1.1
- '@vitest/utils': 1.1.1
+ '@vitest/spy': 1.1.3
+ '@vitest/utils': 1.1.3
chai: 4.3.10
dev: true
- /@vitest/runner@1.1.1:
- resolution: {integrity: sha512-8HokyJo1SnSi3uPFKfWm/Oq1qDwLC4QDcVsqpXIXwsRPAg3gIDh8EbZ1ri8cmQkBxdOu62aOF9B4xcqJhvt4xQ==}
+ /@vitest/runner@1.1.3:
+ resolution: {integrity: sha512-Va2XbWMnhSdDEh/OFxyUltgQuuDRxnarK1hW5QNN4URpQrqq6jtt8cfww/pQQ4i0LjoYxh/3bYWvDFlR9tU73g==}
dependencies:
- '@vitest/utils': 1.1.1
+ '@vitest/utils': 1.1.3
p-limit: 5.0.0
pathe: 1.1.1
dev: true
- /@vitest/snapshot@1.1.1:
- resolution: {integrity: sha512-WnMHjv4VdHLbFGgCdVVvyRkRPnOKN75JJg+LLTdr6ah7YnL75W+7CTIMdzPEPzaDxA8r5yvSVlc1d8lH3yE28w==}
+ /@vitest/snapshot@1.1.3:
+ resolution: {integrity: sha512-U0r8pRXsLAdxSVAyGNcqOU2H3Z4Y2dAAGGelL50O0QRMdi1WWeYHdrH/QWpN1e8juWfVKsb8B+pyJwTC+4Gy9w==}
dependencies:
magic-string: 0.30.5
pathe: 1.1.1
pretty-format: 29.7.0
dev: true
- /@vitest/spy@1.1.1:
- resolution: {integrity: sha512-hDU2KkOTfFp4WFFPWwHFauddwcKuGQ7gF6Un/ZZkCogoAiTMN7/7YKvUDbywPZZ754iCQGjdUmXN3t4k0jm1IQ==}
+ /@vitest/spy@1.1.3:
+ resolution: {integrity: sha512-Ec0qWyGS5LhATFQtldvChPTAHv08yHIOZfiNcjwRQbFPHpkih0md9KAbs7TfeIfL7OFKoe7B/6ukBTqByubXkQ==}
dependencies:
tinyspy: 2.2.0
dev: true
- /@vitest/utils@1.1.1:
- resolution: {integrity: sha512-E9LedH093vST/JuBSyHLFMpxJKW3dLhe/flUSPFedoyj4wKiFX7Jm8gYLtOIiin59dgrssfmFv0BJ1u8P/LC/A==}
+ /@vitest/utils@1.1.3:
+ resolution: {integrity: sha512-Dyt3UMcdElTll2H75vhxfpZu03uFpXRCHxWnzcrFjZxT1kTbq8ALUYIeBgGolo1gldVdI0YSlQRacsqxTwNqwg==}
dependencies:
diff-sequences: 29.6.3
+ estree-walker: 3.0.3
loupe: 2.3.7
pretty-format: 29.7.0
dev: true
@@ -2437,6 +2438,11 @@ packages:
engines: {node: '>=0.4.0'}
dev: true
+ /acorn-walk@8.3.1:
+ resolution: {integrity: sha512-TgUZgYvqZprrl7YldZNoa9OciCAyZR+Ejm9eXzKCmjsF5IKp/wgQ7Z/ZpjpGTIUPwrHQIcYeI8qDh4PsEwxMbw==}
+ engines: {node: '>=0.4.0'}
+ dev: true
+
/acorn@8.11.2:
resolution: {integrity: sha512-nc0Axzp/0FILLEVsm4fNwLCwMttvhEI263QtVPQcbpfZZ3ts0hLsZGOpE6czNlid7CJ9MlyH8reXkpsf3YUY4w==}
engines: {node: '>=0.4.0'}
@@ -3991,6 +3997,12 @@ packages:
resolution: {integrity: sha512-Rfkk/Mp/DL7JVje3u18FxFujQlTNR2q6QfMSMB7AvCBx91NGj/ba3kCfza0f6dVDbw7YlRf/nDrn7pQrCCyQ/w==}
dev: true
+ /estree-walker@3.0.3:
+ resolution: {integrity: sha512-7RUKfXgSMMkzt6ZuXmqapOurLGPPfgj6l9uRZ7lRGolvk0y2yocc35LdcxKC5PQZdn2DMqioAQ2NoWcrTKmm6g==}
+ dependencies:
+ '@types/estree': 1.0.5
+ dev: true
+
/esutils@2.0.3:
resolution: {integrity: sha512-kVscqXk4OCp68SZ0dkgEKVi6/8ij300KBWTJq32P/dYeWTSwK41WyTxalN1eRmA5Z9UU/LX9D7FWSmV9SAYx6g==}
engines: {node: '>=0.10.0'}
@@ -7206,8 +7218,8 @@ packages:
extsprintf: 1.4.1
dev: true
- /vite-node@1.1.1(@types/node@20.10.8)(lightningcss@1.22.1):
- resolution: {integrity: sha512-2bGE5w4jvym5v8llF6Gu1oBrmImoNSs4WmRVcavnG2me6+8UQntTqLiAMFyiAobp+ZXhj5ZFhI7SmLiFr/jrow==}
+ /vite-node@1.1.3(@types/node@20.10.8)(lightningcss@1.22.1):
+ resolution: {integrity: sha512-BLSO72YAkIUuNrOx+8uznYICJfTEbvBAmWClY3hpath5+h1mbPS5OMn42lrTxXuyCazVyZoDkSRnju78GiVCqA==}
engines: {node: ^18.0.0 || >=20.0.0}
hasBin: true
dependencies:
@@ -7351,8 +7363,8 @@ packages:
fsevents: 2.3.3
dev: true
- /vitest@1.1.1(@types/node@20.10.8)(jsdom@23.2.0)(lightningcss@1.22.1):
- resolution: {integrity: sha512-Ry2qs4UOu/KjpXVfOCfQkTnwSXYGrqTbBZxw6reIYEFjSy1QUARRg5pxiI5BEXy+kBVntxUYNMlq4Co+2vD3fQ==}
+ /vitest@1.1.3(@types/node@20.10.8)(jsdom@23.2.0)(lightningcss@1.22.1):
+ resolution: {integrity: sha512-2l8om1NOkiA90/Y207PsEvJLYygddsOyr81wLQ20Ra8IlLKbyQncWsGZjnbkyG2KwwuTXLQjEPOJuxGMG8qJBQ==}
engines: {node: ^18.0.0 || >=20.0.0}
hasBin: true
peerDependencies:
@@ -7377,12 +7389,12 @@ packages:
optional: true
dependencies:
'@types/node': 20.10.8
- '@vitest/expect': 1.1.1
- '@vitest/runner': 1.1.1
- '@vitest/snapshot': 1.1.1
- '@vitest/spy': 1.1.1
- '@vitest/utils': 1.1.1
- acorn-walk: 8.3.0
+ '@vitest/expect': 1.1.3
+ '@vitest/runner': 1.1.3
+ '@vitest/snapshot': 1.1.3
+ '@vitest/spy': 1.1.3
+ '@vitest/utils': 1.1.3
+ acorn-walk: 8.3.1
cac: 6.7.14
chai: 4.3.10
debug: 4.3.4(supports-color@8.1.1)
@@ -7397,7 +7409,7 @@ packages:
tinybench: 2.5.1
tinypool: 0.8.1
vite: 5.0.11(@types/node@20.10.8)(lightningcss@1.22.1)
- vite-node: 1.1.1(@types/node@20.10.8)(lightningcss@1.22.1)
+ vite-node: 1.1.3(@types/node@20.10.8)(lightningcss@1.22.1)
why-is-node-running: 2.2.2
transitivePeerDependencies:
- less