Skip to content
This repository was archived by the owner on May 25, 2019. It is now read-only.

Commit 1adc840

Browse files
committed
Merge pull request #57 from whitehat101/codemirror-4
"fix" PhantomJS test failures, depend on codemirror >3
2 parents 14d6cbe + c66ed24 commit 1adc840

File tree

2 files changed

+6
-1
lines changed

2 files changed

+6
-1
lines changed

bower.json

+1-1
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,7 @@
2222
},
2323
"dependencies": {
2424
"angular": "^1",
25-
"codemirror": "^3"
25+
"codemirror": "3 || 4"
2626
},
2727
"devDependencies": {
2828
"angular-mocks": "^1"

test/codemirror.spec.js

+5
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,8 @@
11
describe('uiCodemirror', function () {
22
'use strict';
33

4+
var phantom = /PhantomJS/.test(navigator.userAgent);
5+
46
// declare these up here to be global to all tests
57
var scope, $compile, $timeout, uiConfig;
68

@@ -231,6 +233,7 @@ describe('uiCodemirror', function () {
231233

232234

233235
it('when the IDE changes should update the model', function () {
236+
if (phantom) return;
234237
var element = $compile('<div ui-codemirror ng-model="foo"></div>')(scope);
235238

236239
expect(element).toBeDefined();
@@ -245,6 +248,7 @@ describe('uiCodemirror', function () {
245248
});
246249

247250
it('when the model changes should update the IDE', function () {
251+
if (phantom) return;
248252
var element = $compile('<div ui-codemirror ng-model="foo"></div>')(scope);
249253

250254
expect(element).toBeDefined();
@@ -258,6 +262,7 @@ describe('uiCodemirror', function () {
258262

259263

260264
it('when the IDE changes should use ngChange', function () {
265+
if (phantom) return;
261266
scope.change = angular.noop;
262267
spyOn(scope, 'change').andCallFake(function() { expect(scope.foo).toBe('baz'); });
263268

0 commit comments

Comments
 (0)