Skip to content

Commit

Permalink
UI: fix unit tests (#9798)
Browse files Browse the repository at this point in the history
  • Loading branch information
weizhouapache authored Oct 16, 2024
1 parent 017cf2c commit 9661060
Show file tree
Hide file tree
Showing 2 changed files with 20 additions and 0 deletions.
10 changes: 10 additions & 0 deletions ui/tests/unit/components/view/ActionButton.spec.js
Original file line number Diff line number Diff line change
Expand Up @@ -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 = {
Expand Down
10 changes: 10 additions & 0 deletions ui/tests/unit/views/compute/MigrateWizard.spec.js
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down

0 comments on commit 9661060

Please sign in to comment.