diff --git a/bower.json b/bower.json index 4e17122..51a5394 100644 --- a/bower.json +++ b/bower.json @@ -22,7 +22,7 @@ }, "dependencies": { "angular": "^1", - "codemirror": "^3" + "codemirror": "3 || 4" }, "devDependencies": { "angular-mocks": "^1" diff --git a/test/codemirror.spec.js b/test/codemirror.spec.js index cbbe582..97c8a07 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; @@ -231,6 +233,7 @@ describe('uiCodemirror', function () { it('when the IDE changes should update the model', function () { + if (phantom) return; var element = $compile('
')(scope); expect(element).toBeDefined(); @@ -245,6 +248,7 @@ describe('uiCodemirror', function () { }); it('when the model changes should update the IDE', function () { + if (phantom) return; var element = $compile('')(scope); expect(element).toBeDefined(); @@ -258,6 +262,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'); });