diff --git a/test/unit/util/vm-manager-hoc.test.jsx b/test/unit/util/vm-manager-hoc.test.jsx index 798e3a7e4f43cb1598915b2392d9e6a62fe2baa6..a1b913253c62fa5c7455a5f3a743463c19cf6700 100644 --- a/test/unit/util/vm-manager-hoc.test.jsx +++ b/test/unit/util/vm-manager-hoc.test.jsx @@ -19,11 +19,16 @@ describe('VMManagerHOC', () => { projectState: {}, mode: {}, vmStatus: {} + }, + locales: { + locale: '', + messages: {} } }); vm = new VM(); vm.attachAudioEngine = jest.fn(); vm.setCompatibilityMode = jest.fn(); + vm.setLocale = jest.fn(); vm.start = jest.fn(); }); test('when it mounts in player mode, the vm is initialized but not started', () => { @@ -39,6 +44,7 @@ describe('VMManagerHOC', () => { ); expect(vm.attachAudioEngine.mock.calls.length).toBe(1); expect(vm.setCompatibilityMode.mock.calls.length).toBe(1); + expect(vm.setLocale.mock.calls.length).toBe(1); expect(vm.initialized).toBe(true); // But vm should not be started automatically @@ -57,6 +63,7 @@ describe('VMManagerHOC', () => { ); expect(vm.attachAudioEngine.mock.calls.length).toBe(1); expect(vm.setCompatibilityMode.mock.calls.length).toBe(1); + expect(vm.setLocale.mock.calls.length).toBe(1); expect(vm.initialized).toBe(true); expect(vm.start).toHaveBeenCalled(); @@ -75,6 +82,7 @@ describe('VMManagerHOC', () => { ); expect(vm.attachAudioEngine.mock.calls.length).toBe(0); expect(vm.setCompatibilityMode.mock.calls.length).toBe(0); + expect(vm.setLocale.mock.calls.length).toBe(0); expect(vm.initialized).toBe(true); expect(vm.start).toHaveBeenCalled();