Mock app, nodeInfo and settings api in tests

This commit is contained in:
Angelina Filippova 2020-10-12 23:39:12 +03:00
parent 4eed4d0138
commit fedb634c48
12 changed files with 27 additions and 6 deletions

View File

@ -15,6 +15,7 @@ localVue.use(Element)
jest.mock('@/api/app')
jest.mock('@/api/invites')
jest.mock('@/api/nodeInfo')
jest.mock('@/api/settings')
describe('Invite tokens', () => {
let store

View File

@ -16,8 +16,10 @@ localVue.use(Vuex)
localVue.use(VueRouter)
localVue.use(Element)
jest.mock('@/api/app')
jest.mock('@/api/nodeInfo')
jest.mock('@/api/login')
jest.mock('@/api/settings')
describe('Login', () => {
let store

View File

@ -15,6 +15,7 @@ localVue.use(Vuex)
localVue.use(Element)
jest.mock('@/api/app')
jest.mock('@/api/nodeInfo')
jest.mock('@/api/reports')
jest.mock('@/api/settings')

View File

@ -12,7 +12,10 @@ const localVue = createLocalVue()
localVue.use(Vuex)
localVue.use(Element)
jest.mock('@/api/app')
jest.mock('@/api/nodeInfo')
jest.mock('@/api/reports')
jest.mock('@/api/settings')
describe('Report in a timeline', () => {
let store

View File

@ -12,7 +12,10 @@ const localVue = createLocalVue()
localVue.use(Vuex)
localVue.use(Element)
jest.mock('@/api/app')
jest.mock('@/api/nodeInfo')
jest.mock('@/api/reports')
jest.mock('@/api/settings')
describe('Reports filter', () => {
let store

View File

@ -12,7 +12,10 @@ const localVue = createLocalVue()
localVue.use(Vuex)
localVue.use(Element)
jest.mock('@/api/app')
jest.mock('@/api/nodeInfo')
jest.mock('@/api/reports')
jest.mock('@/api/settings')
jest.mock('@/api/status')
describe('Status in reports', () => {

View File

@ -14,9 +14,10 @@ localVue.use(Vuex)
localVue.use(Element)
jest.mock('@/api/app')
jest.mock('@/api/status')
jest.mock('@/api/peers')
jest.mock('@/api/nodeInfo')
jest.mock('@/api/peers')
jest.mock('@/api/settings')
jest.mock('@/api/status')
describe('Statuses', () => {
let store

View File

@ -14,9 +14,10 @@ localVue.use(Vuex)
localVue.use(Element)
jest.mock('@/api/app')
jest.mock('@/api/status')
jest.mock('@/api/peers')
jest.mock('@/api/nodeInfo')
jest.mock('@/api/peers')
jest.mock('@/api/settings')
jest.mock('@/api/status')
describe('Statuses', () => {
let store

View File

@ -20,9 +20,10 @@ const $route = {
}
jest.mock('@/api/app')
jest.mock('@/api/status')
jest.mock('@/api/peers')
jest.mock('@/api/nodeInfo')
jest.mock('@/api/peers')
jest.mock('@/api/settings')
jest.mock('@/api/status')
jest.mock('@/api/users')
describe('Status show page', () => {

View File

@ -13,7 +13,9 @@ const localVue = createLocalVue()
localVue.use(Vuex)
localVue.use(Element)
jest.mock('@/api/app')
jest.mock('@/api/nodeInfo')
jest.mock('@/api/settings')
jest.mock('@/api/users')
describe('Apply users actions to multiple users', () => {

View File

@ -22,6 +22,7 @@ const $route = {
jest.mock('@/api/app')
jest.mock('@/api/nodeInfo')
jest.mock('@/api/users')
jest.mock('@/api/settings')
describe('User profile', () => {
let store

View File

@ -13,7 +13,9 @@ const localVue = createLocalVue()
localVue.use(Vuex)
localVue.use(Element)
jest.mock('@/api/app')
jest.mock('@/api/nodeInfo')
jest.mock('@/api/settings')
jest.mock('@/api/users')
describe('Filters users', () => {