Skip to content

Commit

Permalink
revert ui5 bump, bump vitest, add awaits
Browse files Browse the repository at this point in the history
  • Loading branch information
OliwiaGowor committed Oct 11, 2024
1 parent dcd5af0 commit 2be1eb9
Show file tree
Hide file tree
Showing 8 changed files with 132 additions and 192 deletions.
293 changes: 116 additions & 177 deletions package-lock.json

Large diffs are not rendered by default.

14 changes: 7 additions & 7 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -62,12 +62,12 @@
"@types/jsonpath": "^0.2.0",
"@types/pluralize": "^0.0.29",
"@ui-schema/ui-schema": "^0.4.5",
"@ui5/webcomponents": "^1.24.1",
"@ui5/webcomponents-base": "^1.24.1",
"@ui5/webcomponents-fiori": "^1.24.1",
"@ui5/webcomponents-icons": "^1.24.1",
"@ui5/webcomponents-icons-tnt": "^1.24.1",
"@ui5/webcomponents-react": "^1.28.2",
"@ui5/webcomponents": "^1.24.0",
"@ui5/webcomponents-base": "^1.24.0",
"@ui5/webcomponents-fiori": "^1.24.0",
"@ui5/webcomponents-icons": "^1.24.0",
"@ui5/webcomponents-icons-tnt": "^1.24.0",
"@ui5/webcomponents-react": "~1.28.1",
"@ui5/webcomponents-react-base": "^1.28.1",
"@ui5/webcomponents-react-charts": "^1.28.1",
"classnames": "^2.2.6",
Expand Down Expand Up @@ -139,7 +139,7 @@
"vite-plugin-static-copy": "^1.0.6",
"vite-plugin-svgr": "^4.2.0",
"vite-tsconfig-paths": "^5.0.1",
"vitest": "^2.1.1"
"vitest": "^2.1.2"
},
"lint-staged": {
"src/i18n/*.yaml": "yaml-sort --lineWidth=-1 -i ",
Expand Down
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
import { render } from 'testing/reactTestingUtils';
import { ResourceLink } from '../ResourceLink';

vi.mock('react-router', () => ({
...vi.importActual('react-router'),
vi.mock('react-router', async () => ({
...(await vi.importActual('react-router')),
useMatch: () => {
return {
params: {
Expand Down
4 changes: 2 additions & 2 deletions src/components/Extensibility/tests/useGetCRDByPath.test.js
Original file line number Diff line number Diff line change
Expand Up @@ -6,8 +6,8 @@ import { RecoilRoot } from 'recoil';
let mockNamespaceId = 'namespaceId';
let mockCrds = [];

vi.mock('react-router-dom', () => ({
...vi.importActual('react-router-dom'),
vi.mock('react-router-dom', async () => ({
...(await vi.importActual('react-router-dom')),
useParams: () => ({
namespaceId: mockNamespaceId,
}),
Expand Down
2 changes: 1 addition & 1 deletion src/components/HelmReleases/tests/HelmReleaseData.test.js
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ vi.mock('components/HelmReleases/decodeHelmRelease', () => ({
decodeHelmRelease: release => mockDecodeHelmRelease(release),
}));

const originalDecodeHelmRelease = vi.importActual(
const originalDecodeHelmRelease = await vi.importActual(
'components/HelmReleases/decodeHelmRelease',
);

Expand Down
4 changes: 2 additions & 2 deletions src/shared/components/ControlledBy/test/ControlledBy.test.js
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
import { render } from 'testing/reactTestingUtils';
import { ControlledBy } from '../ControlledBy';

vi.mock('react-router', () => ({
...vi.importActual('react-router'),
vi.mock('react-router', async () => ({
...(await vi.importActual('react-router')),
useMatch: () => ({
params: {
cluster: 'test-cluster',
Expand Down
2 changes: 1 addition & 1 deletion src/shared/components/__mocks__/popper.js.js
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
const PopperJS = vi.importActual('popper.js');
const PopperJS = await vi.importActual('popper.js');

/* eslint-disable import/no-anonymous-default-export */
export default class {
Expand Down
1 change: 1 addition & 0 deletions vitest.config.js
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,7 @@ export default mergeConfig(
plugins: [viteTsconfigPaths()],
globals: true, // Enable globals for Vitest
setupFiles: ['./src/setupTests.js'],
fileParallelism: false,
},
}),
);

0 comments on commit 2be1eb9

Please sign in to comment.