Mock app, nodeInfo and settings api in tests
This commit is contained in:
parent
4eed4d0138
commit
fedb634c48
12 changed files with 27 additions and 6 deletions
|
@ -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
|
||||
|
|
|
@ -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
|
||||
|
|
|
@ -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')
|
||||
|
||||
|
|
|
@ -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
|
||||
|
|
|
@ -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
|
||||
|
|
|
@ -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', () => {
|
||||
|
|
|
@ -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
|
||||
|
|
|
@ -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
|
||||
|
|
|
@ -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', () => {
|
||||
|
|
|
@ -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', () => {
|
||||
|
|
|
@ -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
|
||||
|
|
|
@ -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', () => {
|
||||
|
|
Loading…
Reference in a new issue