mirror of
https://akkoma.dev/AkkomaGang/akkoma-fe.git
synced 2025-02-25 14:43:04 +01:00
20 lines
531 B
JavaScript
20 lines
531 B
JavaScript
|
import './commands'
|
||
|
import Vuex from 'vuex'
|
||
|
import getStore from '../../src/store'
|
||
|
|
||
|
|
||
|
import { mount } from 'cypress/vue'
|
||
|
|
||
|
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, or initialize a new one
|
||
|
options.store = options.store || getStore()
|
||
|
|
||
|
// Add Vuex plugin
|
||
|
options.extensions.plugins.push(Vuex)
|
||
|
|
||
|
return mount(component, options)
|
||
|
})
|