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

Commit

Permalink
Merge pull request #57 from whitehat101/codemirror-4
Browse files Browse the repository at this point in the history
"fix" PhantomJS test failures, depend on codemirror >3
  • Loading branch information
douglasduteil committed Jul 4, 2014
2 parents 14d6cbe + c66ed24 commit 1adc840
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 1 deletion.
2 changes: 1 addition & 1 deletion bower.json
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@
},
"dependencies": {
"angular": "^1",
"codemirror": "^3"
"codemirror": "3 || 4"
},
"devDependencies": {
"angular-mocks": "^1"
Expand Down
5 changes: 5 additions & 0 deletions test/codemirror.spec.js
Original file line number Diff line number Diff line change
@@ -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;

Expand Down Expand Up @@ -231,6 +233,7 @@ describe('uiCodemirror', function () {


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

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

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

expect(element).toBeDefined();
Expand All @@ -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'); });

Expand Down

0 comments on commit 1adc840

Please sign in to comment.