0

Getting this error while accesing vuex store in component testing in vue

import './commands'

import {mount} from 'cypress/vue2'
import Vuex from 'vuex'
import {getStore} from '@global/store/index'

Cypress.Commands.add('mount', (component, options = {}) => {
    // Setup options object
    options.extensions = options.extensions || {}
    options.extensions.plugins = options.extensions.plugins || []

    // Use store passed in from options, store initialize a new one
    options.store = options.store || getStore()

    // Add Vuex plugin
    options.extensions.plugins.push(Vuex)

    return mount(component, options)
})

I am getting this error error

Shan
  • 1
  • 1
  • [Please do not upload images of code/data/errors.](//meta.stackoverflow.com/q/285551/1772220) – ugexe Apr 17 '23 at 15:03

0 Answers0