diff --git a/kolibri/plugins/learn/assets/src/composables/__mocks__/useDevices.js b/kolibri/plugins/learn/assets/src/composables/__mocks__/useDevices.js index a8fdb132d50..aaadc15de4d 100644 --- a/kolibri/plugins/learn/assets/src/composables/__mocks__/useDevices.js +++ b/kolibri/plugins/learn/assets/src/composables/__mocks__/useDevices.js @@ -31,9 +31,12 @@ * ``` */ +import { ref } from 'kolibri.lib.vueCompositionApi'; + const MOCK_DEFAULTS = { fetchDevices: jest.fn(() => Promise.resolve([])), baseurl: null, + networkDevices: ref({}), }; export function useDevicesMock(overrides = {}) { @@ -43,6 +46,14 @@ export function useDevicesMock(overrides = {}) { }; } +const DEVICE_DATA_DEFAULTS = { + baseurl: 'http://test-device', + deviceName: 'test-device', + instanceId: '1234', +}; + +export const currentDeviceData = jest.fn(() => DEVICE_DATA_DEFAULTS); + export default jest.fn(() => useDevicesMock()); export const setCurrentDevice = jest.fn(id =>