openmct/src/testTools.js

19 lines
441 B
JavaScript
Raw Normal View History

import MCT from 'MCT';
export function createOpenMct() {
const openmct = new MCT();
openmct.install(openmct.plugins.LocalStorage());
openmct.install(openmct.plugins.UTCTimeSystem());
openmct.time.timeSystem('utc', {start: 0, end: 1});
return openmct;
}
export function createMouseEvent(eventName) {
return new MouseEvent(eventName, {
bubbles: true,
cancelable: true,
view: window
});
}