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

"fix" PhantomJS test failures, depend on codemirror >3 #57

Merged
merged 2 commits into from
Jul 4, 2014
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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 @@ -189,6 +191,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 @@ -203,6 +206,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 @@ -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'); });

Expand Down