UI: fix unit tests (#9798)

This commit is contained in:
Wei Zhou 2024-10-16 07:14:45 +02:00 committed by GitHub
parent 017cf2c367
commit 96610603ca
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
2 changed files with 20 additions and 0 deletions

View File

@ -23,6 +23,16 @@ import mockData from '../../../mockData/ActionButton.mock.json'
import ActionButton from '@/components/view/ActionButton'
jest.mock('axios', () => mockAxios)
jest.mock('@/vue-app', () => ({
vueProps: {
$localStorage: {
set: jest.fn((key, value) => {}),
get: jest.fn((key) => {
return null
})
}
}
}))
let router, store, i18n
const state = {

View File

@ -23,6 +23,16 @@ import mockData from '../../../mockData/MigrateWizard.mock'
import MigrateWizard from '@/views/compute/MigrateWizard'
jest.mock('axios', () => mockAxios)
jest.mock('@/vue-app', () => ({
vueProps: {
$localStorage: {
set: jest.fn((key, value) => {}),
get: jest.fn((key) => {
return null
})
}
}
}))
let i18n
let store