fix driver unit tests (#10714)

This commit is contained in:
Nancy 2024-03-27 11:34:18 -07:00 committed by GitHub
parent ba94731a93
commit c393cba656
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
2 changed files with 10 additions and 3 deletions

View File

@ -2,6 +2,7 @@
import { mount } from '@vue/test-utils';
import KontainerDriverEdit from '@shell/edit/kontainerDriver.vue';
import { _CREATE } from '@shell/config/query-params';
import { cleanHtmlDirective } from '@shell/plugins/clean-html-directive';
describe('view: kontainerdriver should', () => {
const url = 'http://test.com';
@ -15,11 +16,13 @@ describe('view: kontainerdriver should', () => {
'current_store/all': jest.fn(),
'i18n/t': (val: string) => val,
'i18n/exists': jest.fn(),
}
},
dispatch: jest.fn()
},
$route: { query: { AS: '' } },
$router: { applyQuery: jest.fn() },
},
directives: { cleanHtmlDirective },
propsData: {
value: {
spec: {

View File

@ -2,6 +2,7 @@
import { mount } from '@vue/test-utils';
import NodeDriverEdit from '@shell/edit/nodeDriver.vue';
import { _CREATE } from '@shell/config/query-params';
import { cleanHtmlDirective } from '@shell/plugins/clean-html-directive';
describe('view: nodedriver should', () => {
const url = 'http://test.com';
@ -15,11 +16,14 @@ describe('view: nodedriver should', () => {
'current_store/all': jest.fn(),
'i18n/t': (val: string) => val,
'i18n/exists': jest.fn(),
}
},
dispatch: jest.fn()
},
$route: { query: { AS: '' } },
$router: { applyQuery: jest.fn() },
},
directives: { cleanHtmlDirective },
propsData: {
value: {
spec: {