Fix tests
This commit is contained in:
parent
8956e68fa1
commit
3daf35d0b0
6 changed files with 14 additions and 1 deletions
9
src/api/__mocks__/nodeInfo.js
Normal file
9
src/api/__mocks__/nodeInfo.js
Normal file
|
@ -0,0 +1,9 @@
|
|||
export async function getNodeInfo(authHost) {
|
||||
const data = {
|
||||
metadata: {
|
||||
mailerEnabled: true
|
||||
}
|
||||
}
|
||||
|
||||
return Promise.resolve({ data })
|
||||
}
|
|
@ -10,7 +10,7 @@ const service = axios.create({
|
|||
service.interceptors.response.use(
|
||||
response => response,
|
||||
error => {
|
||||
console.log('Error ' + error)
|
||||
console.log(`Error ${error}`)
|
||||
console.log(error.response.data)
|
||||
|
||||
// If there's an "error" property in the json, use it
|
||||
|
|
|
@ -16,6 +16,7 @@ localVue.use(Vuex)
|
|||
localVue.use(VueRouter)
|
||||
localVue.use(Element)
|
||||
|
||||
jest.mock('@/api/nodeInfo')
|
||||
jest.mock('@/api/login')
|
||||
|
||||
describe('Login', () => {
|
||||
|
|
|
@ -14,6 +14,7 @@ const localVue = createLocalVue()
|
|||
localVue.use(Vuex)
|
||||
localVue.use(Element)
|
||||
|
||||
jest.mock('@/api/nodeInfo')
|
||||
jest.mock('@/api/users')
|
||||
|
||||
describe('Search and filter users', () => {
|
||||
|
|
|
@ -13,6 +13,7 @@ const localVue = createLocalVue()
|
|||
localVue.use(Vuex)
|
||||
localVue.use(Element)
|
||||
|
||||
jest.mock('@/api/nodeInfo')
|
||||
jest.mock('@/api/users')
|
||||
|
||||
describe('Apply users actions to multiple users', () => {
|
||||
|
|
|
@ -13,6 +13,7 @@ const localVue = createLocalVue()
|
|||
localVue.use(Vuex)
|
||||
localVue.use(Element)
|
||||
|
||||
jest.mock('@/api/nodeInfo')
|
||||
jest.mock('@/api/users')
|
||||
|
||||
describe('Filters users', () => {
|
||||
|
|
Loading…
Reference in a new issue