diff --git a/.gulp/tasks/tests.js b/.gulp/tasks/tests.js index a0a2931d..b75c988a 100644 --- a/.gulp/tasks/tests.js +++ b/.gulp/tasks/tests.js @@ -12,7 +12,7 @@ module.exports = function (gulp, config) { .pipe(istanbul.hookRequire()) .on('finish', function () { gulp.src(config.test.src) - .pipe(jasmine({ verbose: true, errorOnFail: false, includeStackTrace: false })) + .pipe(jasmine({ verbose: true, errorOnFail: true, includeStackTrace: false })) .pipe(istanbul.writeReports({ dir: config.test.coverage.dest, reporters: ['json'] diff --git a/packages/desktopjs-electron/tests/electron.spec.ts b/packages/desktopjs-electron/tests/electron.spec.ts index 8f700229..fdd3dcb5 100644 --- a/packages/desktopjs-electron/tests/electron.spec.ts +++ b/packages/desktopjs-electron/tests/electron.spec.ts @@ -1012,7 +1012,7 @@ describe("ElectronGlobalShortcutManager", () => { beforeEach(() => { electron = { globalShortcut: jasmine.createSpyObj("Electron", ["register", "unregister", "isRegistered", "unregisterAll"]) }; - container = new ElectronContainer(electron); + container = new ElectronContainer(electron, new MockIpc()); }); it ("register", () => { diff --git a/packages/desktopjs-openfin/tests/openfin.spec.ts b/packages/desktopjs-openfin/tests/openfin.spec.ts index 36925bdb..95d8b02b 100644 --- a/packages/desktopjs-openfin/tests/openfin.spec.ts +++ b/packages/desktopjs-openfin/tests/openfin.spec.ts @@ -21,7 +21,7 @@ class MockDesktop { } } } - GlobalHotkey: any; + GlobalHotkey: any = { }; Window: any = MockWindow; Notification(): any { return {}; } InterApplicationBus: any = new MockInterApplicationBus(); @@ -508,7 +508,7 @@ describe("OpenFinContainer", () => { let app; beforeEach(() => { - desktop = jasmine.createSpyObj("desktop", ["Application", "InterApplicationBus"]); + desktop = jasmine.createSpyObj("desktop", ["Application", "InterApplicationBus", "GlobalHotkey"]); app = jasmine.createSpyObj("application", ["getCurrent", "registerUser", "addEventListener"]); Object.defineProperty(desktop, "Application", { value: app }); Object.defineProperty(desktop, "InterApplicationBus", { value: new MockInterApplicationBus() }); @@ -819,7 +819,7 @@ describe("OpenFinDisplayManager", () => { let system; beforeEach(() => { - desktop = jasmine.createSpyObj("desktop", ["Application", "System", "InterApplicationBus"]); + desktop = jasmine.createSpyObj("desktop", ["Application", "System", "InterApplicationBus", "GlobalHotkey"]); app = jasmine.createSpyObj("application", ["getCurrent", "addEventListener"]); system = jasmine.createSpyObj("system", ["getMonitorInfo", "getMousePosition"]); Object.defineProperty(desktop, "Application", { value: app }); @@ -900,8 +900,8 @@ describe("OpenfinGlobalShortcutManager", () => { it ("Unavailable in OpenFin is unavailable on container", () => { delete desktop.GlobalHotkey; - const container = new OpenFinContainer(desktop); spyOn(console, "warn").and.stub(); + const container = new OpenFinContainer(desktop); expect(container.globalShortcut).toBeUndefined(); expect(console.warn).toHaveBeenCalledWith("Global shortcuts require minimum OpenFin runtime of 9.61.32.34"); });