Business
Jobs
  • About Us
  • Solutions
    • Job Postings
      Post your job and receive qualified candidates in 48h.
    • Candidate Assessments
      500+ technical and psychological tests, plus anti-fraud.
    • Headhunting
      Tailor-made executive search from start to finish.
    • Payroll + EOR
      Payroll dispersal and EOR across 15+ LATAM countries.
  • Pricing
  • Jobs

0

208
Views
Jest test vuex state fue anulado por un módulo con el mismo nombre

Estoy probando una aplicación con vuex, tengo una tienda principal y un módulo, todo funciona bien en la aplicación en sí, pero cuando uso las pruebas me sale una advertencia.

console.warn [vuex] campo de estado "institutos" fue anulado por un módulo con el mismo nombre en "institutos"

tienda principal

 export const state = {} export default new Vuex.Store({ state, mutations, actions, getters, modules: { institutes } })

tienda secundaria

 export const stateInst = {} export default { namespaced: true, state: () => stateInst, mutations, actions }

prueba.spec.js

 import Vuex from "vuex" import {mount, createLocalVue} from "@vue/test-utils" import Institutes from '../../assets/src/components/Institutes' import { state } from '../../assets/src/store/index' import { stateInst } from '../../assets/src/store/institutes-store' const localVue = createLocalVue() localVue.use(Vuex) describe('testing component', () => { let store beforeEach(() => { store = new Vuex.Store({state, modules: { institutes: { namespaced: true, state: () => stateInst, mutations, actions, } } }) }) test('some test', async () => { const wrapper = mount(Institutes, { store, localVue }) }) })

Traté de seguir los consejos que se dan en la documentación, pero no funciona o interrumpe mi aplicación. ingrese la descripción del enlace aquí

about 4 years ago · Juan Pablo Isaza
Answer question
Find remote jobs

Discover the new way to find a job!

Top jobs
Top job categories
Business
Post vacancy Pricing Sales
Legal
Terms and conditions Privacy policy
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Show me some job opportunities
There's an error!