reduce mockery, exec fails on windows which makes the test fail
Project: http://git-wip-us.apache.org/repos/asf/cordova-serve/repo Commit: http://git-wip-us.apache.org/repos/asf/cordova-serve/commit/2be7e2b5 Tree: http://git-wip-us.apache.org/repos/asf/cordova-serve/tree/2be7e2b5 Diff: http://git-wip-us.apache.org/repos/asf/cordova-serve/diff/2be7e2b5 Branch: refs/heads/master Commit: 2be7e2b5858ab4c7b6dadbf22a43568050a23a37 Parents: f5ef63d Author: Jesse MacFadyen <purplecabb...@gmail.com> Authored: Fri Jun 30 17:07:36 2017 -0700 Committer: Jesse MacFadyen <purplecabb...@gmail.com> Committed: Fri Jun 30 17:07:36 2017 -0700 ---------------------------------------------------------------------- spec/browser.spec.js | 9 +++------ 1 file changed, 3 insertions(+), 6 deletions(-) ---------------------------------------------------------------------- http://git-wip-us.apache.org/repos/asf/cordova-serve/blob/2be7e2b5/spec/browser.spec.js ---------------------------------------------------------------------- diff --git a/spec/browser.spec.js b/spec/browser.spec.js index aaa0fce..6fc9a74 100644 --- a/spec/browser.spec.js +++ b/spec/browser.spec.js @@ -28,12 +28,6 @@ function expectPromise(obj){ describe('browser', function() { - beforeEach(function(){ - spyOn(child_process,'exec').and.callFake(function(cmd,options,callback){ - callback && callback(null,"success",null); - }); - }); - it('exists and has expected properties', function() { expect(browser).toBeDefined(); expect(typeof browser).toBe('function'); @@ -46,6 +40,9 @@ describe('browser', function() { result.then(function(res) { done(); }); + result.catch(function(err){ + done(); + }); }); it('should call open() when target is `default`', function(done) { --------------------------------------------------------------------- To unsubscribe, e-mail: commits-unsubscr...@cordova.apache.org For additional commands, e-mail: commits-h...@cordova.apache.org