Create vuex modules for Films/Vehicles/Locations/People + Test adaptation
This commit is contained in:
@@ -13,7 +13,7 @@ const localVue = createLocalVue();
|
||||
localVue.use(Vuex);
|
||||
|
||||
describe("Film page", () => {
|
||||
let state, actions, store;
|
||||
let state, actions, getters, store;
|
||||
|
||||
beforeEach(() => {
|
||||
state = {
|
||||
@@ -22,7 +22,19 @@ describe("Film page", () => {
|
||||
actions = {
|
||||
getFilm: jest.fn()
|
||||
};
|
||||
store = new Vuex.Store({ state, actions });
|
||||
getters = {
|
||||
film: jest.fn()
|
||||
};
|
||||
store = new Vuex.Store({
|
||||
modules: {
|
||||
films: {
|
||||
namespaced: true,
|
||||
state,
|
||||
actions,
|
||||
getters
|
||||
}
|
||||
}
|
||||
});
|
||||
});
|
||||
|
||||
it("should render Film page instance", () => {
|
||||
|
||||
Reference in New Issue
Block a user