You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I am trying to run my test case but getting this error =>
( throw new Error('[Vuex Pathify] Unexpected condition: this.$store is undefined.\n\nThis is a known edge case with some setups and will cause future lookups to fail')
^
Error: [Vuex Pathify] Unexpected condition: this.$store is undefined.)
this is my test Setup
import {
mount,
shallowMount,
createLocalVue,
RouterLinkStub
} from '@vue/test-utils'
import VueRouter from 'vue-router'
import mockRouter from './mockRouter'
import infiniteScroll from 'vue-infinite-scroll'
import Vuex from 'vuex'
import store from '../../src/state/index'
import '@/fontawesome'
import { i18n } from '@/i18n'
const router = mockRouter.mock()
global.wrap = (Component, options) => {
const localVue = createLocalVue()
localVue.use(VueRouter)
localVue.use(infiniteScroll)
localVue.use(Vuex)
const wrapper = shallowMount(Component, {
localVue,
router,
i18n,
store
})
return wrapper
}
this is my test
`import { shallowMount } from '@vue/test-utils'
import UpdateStatusModal from '../CircleMenu/UpdateStatusModal.vue'
I am trying to run my test case but getting this error
=>
( throw new Error('[Vuex Pathify] Unexpected condition: this.$store is undefined.\n\nThis is a known edge case with some setups and will cause future lookups to fail')
^
Error: [Vuex Pathify] Unexpected condition: this.$store is undefined.)
this is my test Setup
this is my test
`import { shallowMount } from '@vue/test-utils'
import UpdateStatusModal from '../CircleMenu/UpdateStatusModal.vue'
describe('UpdateStatusModal', () => {
it('should filter status codes for WORK', () => {
const statusCodes = [
{ Value: 'OPEN', text: 'Open' },
{ Value: 'HOLD', text: 'Hold' },
{ Value: 'CLOSE', text: 'Close' },
{ Value: 'WORK', text: 'Work' },
{ Value: 'RESOLVED', text: 'Resolved' }
]
})
it('should filter status codes for RESOLVED', () => {
const statusCodes = [
{ Value: 'OPEN', text: 'Open' },
{ Value: 'HOLD', text: 'Hold' },
{ Value: 'CLOSE', text: 'Close' },
{ Value: 'WORK', text: 'Work' },
{ Value: 'RESOLVED', text: 'Resolved' }
]
})
it('should return all status codes by default', () => {
const statusCodes = [
{ Value: 'OPEN', text: 'Open' },
{ Value: 'HOLD', text: 'Hold' },
{ Value: 'CLOSE', text: 'Close' },
{ Value: 'WORK', text: 'Work' },
{ Value: 'RESOLVED', text: 'Resolved' }
]
})
})
`
and this is my Component
`
Are you sure that you want to close this incident?
Closing an incident will remove it from the incidents list.
`
kindly help me regarding this issue.
The text was updated successfully, but these errors were encountered: