ci: Upgrade vite, and vitest (no-changelog) (#10886)

This commit is contained in:
कारतोफ्फेलस्क्रिप्ट™
2024-09-20 14:44:12 +02:00
committed by GitHub
parent 26a653a79a
commit ecb9ff9916
11 changed files with 444 additions and 484 deletions

View File

@@ -75,7 +75,7 @@
"vue-i18n": "^9.2.2",
"vue-json-pretty": "2.2.4",
"vue-markdown-render": "catalog:frontend",
"vue-router": "^4.2.2",
"vue-router": "catalog:frontend",
"vue3-touch-events": "^4.1.3",
"xss": "^1.0.14"
},

View File

@@ -126,7 +126,7 @@ export const mockedStore = <TStoreDef extends () => unknown>(
Record<string, never>,
{
[K in keyof Actions]: Actions[K] extends (...args: infer Args) => infer ReturnT
? Mock<Args, ReturnT>
? Mock<(...args: Args) => ReturnT>
: Actions[K];
}
> & {

View File

@@ -1,6 +1,6 @@
import 'vue-router';
import type { I18nClass } from '@/plugins/i18n';
import type { Route, RouteLocation } from 'vue-router';
import type { Route, Router, RouteLocation } from 'vue-router';
import type { Telemetry } from '@/plugins/telemetry';
import type { VIEWS } from '@/constants';
import type { IPermissions } from '@/Interface';
@@ -12,7 +12,7 @@ export {};
* @docs https://vuejs.org/guide/typescript/options-api.html#augmenting-global-properties
*/
declare module 'vue' {
declare module '@vue/runtime-core' {
interface ComponentCustomOptions {
beforeRouteEnter?(to: Route, from: Route, next: () => void): void;
beforeRouteLeave?(to: Route, from: Route, next: () => void): void;
@@ -23,6 +23,8 @@ declare module 'vue' {
$style: Record<string, string>;
$locale: I18nClass;
$telemetry: Telemetry;
$route: RouteLocation;
$router: Router;
}
}

View File

@@ -1,4 +1,4 @@
import type { SpyInstance } from 'vitest';
import type { MockInstance } from 'vitest';
import { createTestingPinia } from '@pinia/testing';
import { waitFor, within } from '@testing-library/vue';
import userEvent from '@testing-library/user-event';
@@ -72,7 +72,7 @@ let router: ReturnType<typeof useRouter>;
let route: ReturnType<typeof useRoute>;
let workflowHistoryStore: ReturnType<typeof useWorkflowHistoryStore>;
let workflowsStore: ReturnType<typeof useWorkflowsStore>;
let windowOpenSpy: SpyInstance;
let windowOpenSpy: MockInstance;
describe('WorkflowHistory', () => {
beforeEach(() => {