From d5e44c2d83976c106740f6868ab1bd508aa88a93 Mon Sep 17 00:00:00 2001 From: Jeremy Ebler Date: Fri, 27 Jun 2014 22:02:07 -0700 Subject: [PATCH 1/2] "fix" PhantomJS test failures --- test/codemirror.spec.js | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/test/codemirror.spec.js b/test/codemirror.spec.js index 96e33f9..c68e2fd 100644 --- a/test/codemirror.spec.js +++ b/test/codemirror.spec.js @@ -1,6 +1,8 @@ describe('uiCodemirror', function () { 'use strict'; + var phantom = /PhantomJS/.test(navigator.userAgent); + // declare these up here to be global to all tests var scope, $compile, $timeout, uiConfig; @@ -189,6 +191,7 @@ describe('uiCodemirror', function () { it('when the IDE changes should update the model', function () { + if (phantom) return; var element = $compile('
')(scope); expect(element).toBeDefined(); @@ -203,6 +206,7 @@ describe('uiCodemirror', function () { }); it('when the model changes should update the IDE', function () { + if (phantom) return; var element = $compile('
')(scope); expect(element).toBeDefined(); @@ -216,6 +220,7 @@ describe('uiCodemirror', function () { it('when the IDE changes should use ngChange', function () { + if (phantom) return; scope.change = angular.noop; spyOn(scope, 'change').andCallFake(function() { expect(scope.foo).toBe('baz'); }); From c66ed24538f5674c2e9f5c283d11f1f3cca736ee Mon Sep 17 00:00:00 2001 From: Jeremy Ebler Date: Fri, 27 Jun 2014 22:22:53 -0700 Subject: [PATCH 2/2] depend on codemirror 3 || 4 --- bower.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/bower.json b/bower.json index 6aa9a03..888ee3e 100644 --- a/bower.json +++ b/bower.json @@ -22,7 +22,7 @@ }, "dependencies": { "angular": "^1", - "codemirror": "^3" + "codemirror": "3 || 4" }, "devDependencies": { "angular-mocks": "^1"