Skip to content
This repository was archived by the owner on Oct 2, 2024. It is now read-only.

Commit 85d59ab

Browse files
author
michiel
committed
fix(vue): vue created() does not check if mixin should run
1 parent 09dbcd1 commit 85d59ab

File tree

2 files changed

+5
-1
lines changed

2 files changed

+5
-1
lines changed

packages/vue/__tests__/Mixin/Collection.test.js

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -53,6 +53,9 @@ describe('The Collection mixin', () => {
5353
collectionName: 'products',
5454
$store: {
5555
commit: jest.fn(),
56+
getters: {
57+
'hyral_product/collection': jest.fn(() => null),
58+
},
5659
},
5760
initCollection: collectionMixin.methods.initCollection,
5861
loadCollection: collectionMixin.methods.loadCollection,

packages/vue/__tests__/Module/createStoreModule.test.js

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,7 @@ import ParameterBag from '@hyral/core/src/Resource/ParameterBag';
77

88
describe('The createStoreModule', () => {
99
test('that a store module is created with the required methods', () => {
10+
1011
const module = createStoreModule({}, {});
1112

1213
expect(module).toHaveProperty('namespaced');
@@ -191,7 +192,7 @@ describe('The createStoreModule', () => {
191192

192193
const mockModule = { state: { resources: { 1: product.state } }, commit: jest.fn() };
193194
return module.actions.LOAD_RESOURCE(mockModule, '1').then(() => {
194-
expect(mockRepository.findById).toHaveBeenCalledWith('1');
195+
expect(mockRepository.findById).toHaveBeenCalledWith('1', null);
195196
expect(mockModule.commit).toHaveBeenCalledTimes(1);
196197
expect(mockModule.commit).toHaveBeenCalledWith('SET_RESOURCE', product);
197198
});

0 commit comments

Comments
 (0)