Skip to content

Is documentation Obsolete for Vuex modules? #551

@gkatsanos

Description

@gkatsanos

While implementing we noticed that the proposed syntax for modules does not work: https://vue-test-utils.vuejs.org/en/guides/using-with-vuex.html

Instead, what we ended up doing is this:

import Preferences from 'models/preferences';

  beforeEach(() => {
    store = new Vuex.Store({
      modules: {
        Preferences: {
          state: {
            panelVisible: true,
          },
          mutations: Preferences.mutations,
          getters: Preferences.getters,
          namespaced: true,
        },
      },
    });
  });

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions