@@ -71,17 +71,17 @@ describe('uiCodemirror', function () {
7171 it ( 'should call the CodeMirror constructor with a function' , function ( ) {
7272 $compile ( '<div ui-codemirror></div>' ) ( scope ) ;
7373
74- expect ( CodeMirror . callCount ) . toEqual ( 1 ) ;
75- expect ( CodeMirror ) . toHaveBeenCalledWith ( jasmine . any ( Function ) , jasmine . any ( Object ) ) ;
74+ expect ( window . CodeMirror . callCount ) . toEqual ( 1 ) ;
75+ expect ( window . CodeMirror ) . toHaveBeenCalledWith ( jasmine . any ( Function ) , jasmine . any ( Object ) ) ;
7676
7777 expect ( codemirror ) . toBeDefined ( ) ;
7878 } ) ;
7979
8080 it ( 'should work as an element' , function ( ) {
8181 $compile ( '<ui-codemirror></ui-codemirror>' ) ( scope ) ;
8282
83- expect ( CodeMirror . callCount ) . toEqual ( 1 ) ;
84- expect ( CodeMirror ) . toHaveBeenCalledWith ( jasmine . any ( Function ) , jasmine . any ( Object ) ) ;
83+ expect ( window . CodeMirror . callCount ) . toEqual ( 1 ) ;
84+ expect ( window . CodeMirror ) . toHaveBeenCalledWith ( jasmine . any ( Function ) , jasmine . any ( Object ) ) ;
8585
8686 expect ( codemirror ) . toBeDefined ( ) ;
8787 } ) ;
@@ -91,10 +91,10 @@ describe('uiCodemirror', function () {
9191 var element = $compile ( '<div><div ui-codemirror></div></div>' ) ( scope ) . children ( ) ;
9292
9393 expect ( element ) . toBeDefined ( ) ;
94- expect ( element . prop ( " tagName" ) ) . toBe ( " DIV" ) ;
95- expect ( element . prop ( " classList" ) . length ) . toEqual ( 2 ) ;
96- expect ( element . prop ( " classList" ) [ 0 ] ) . toEqual ( " CodeMirror" ) ;
97- expect ( element . prop ( " classList" ) [ 1 ] ) . toEqual ( " cm-s-default" ) ;
94+ expect ( element . prop ( ' tagName' ) ) . toBe ( ' DIV' ) ;
95+ expect ( element . prop ( ' classList' ) . length ) . toEqual ( 2 ) ;
96+ expect ( element . prop ( ' classList' ) [ 0 ] ) . toEqual ( ' CodeMirror' ) ;
97+ expect ( element . prop ( ' classList' ) [ 1 ] ) . toEqual ( ' cm-s-default' ) ;
9898 } ) ;
9999
100100
@@ -114,13 +114,13 @@ describe('uiCodemirror', function () {
114114
115115 expect ( codemirror . setOption ) . toHaveBeenCalled ( ) ;
116116 expect ( codemirror . setOption . calls . length ) . toEqual ( 1 ) ;
117- expect ( codemirror . setOption ) . toHaveBeenCalledWith ( " oof" , " baar" ) ;
117+ expect ( codemirror . setOption ) . toHaveBeenCalledWith ( ' oof' , ' baar' ) ;
118118
119119 $compile ( '<ui-codemirror ui-codemirror-opts="{oof: \'baar\'}"></ui-codemirror>' ) ( scope ) ;
120120
121121 expect ( codemirror . setOption ) . toHaveBeenCalled ( ) ;
122122 expect ( codemirror . setOption . calls . length ) . toEqual ( 1 ) ;
123- expect ( codemirror . setOption ) . toHaveBeenCalledWith ( " oof" , " baar" ) ;
123+ expect ( codemirror . setOption ) . toHaveBeenCalledWith ( ' oof' , ' baar' ) ;
124124 } ) ;
125125
126126 it ( 'should include the default options' , function ( ) {
@@ -130,7 +130,7 @@ describe('uiCodemirror', function () {
130130
131131 expect ( codemirror . setOption ) . toHaveBeenCalled ( ) ;
132132 expect ( codemirror . setOption . calls . length ) . toEqual ( 1 ) ;
133- expect ( codemirror . setOption ) . toHaveBeenCalledWith ( " bar" , " baz" ) ;
133+ expect ( codemirror . setOption ) . toHaveBeenCalledWith ( ' bar' , ' baz' ) ;
134134 } ) ;
135135
136136 it ( 'should extent the default options' , function ( ) {
@@ -140,8 +140,8 @@ describe('uiCodemirror', function () {
140140
141141 expect ( codemirror . setOption ) . toHaveBeenCalled ( ) ;
142142 expect ( codemirror . setOption . calls . length ) . toEqual ( 2 ) ;
143- expect ( codemirror . setOption ) . toHaveBeenCalledWith ( " oof" , " baar" ) ;
144- expect ( codemirror . setOption ) . toHaveBeenCalledWith ( " bar" , " baz" ) ;
143+ expect ( codemirror . setOption ) . toHaveBeenCalledWith ( ' oof' , ' baar' ) ;
144+ expect ( codemirror . setOption ) . toHaveBeenCalledWith ( ' bar' , ' baz' ) ;
145145 } ) ;
146146
147147 it ( 'should impact codemirror' , function ( ) {
@@ -150,10 +150,10 @@ describe('uiCodemirror', function () {
150150 $compile ( '<div ui-codemirror="{theme: \'baar\'}"></div>' ) ( scope ) ;
151151 expect ( codemirror . setOption ) . toHaveBeenCalled ( ) ;
152152 expect ( codemirror . setOption . calls . length ) . toEqual ( 1 ) ;
153- expect ( codemirror . setOption ) . toHaveBeenCalledWith ( " theme" , " baar" ) ;
153+ expect ( codemirror . setOption ) . toHaveBeenCalledWith ( ' theme' , ' baar' ) ;
154154
155155
156- expect ( codemirror . getOption ( " theme" ) ) . toEqual ( " baar" ) ;
156+ expect ( codemirror . getOption ( ' theme' ) ) . toEqual ( ' baar' ) ;
157157 } ) ;
158158 } ) ;
159159
@@ -193,13 +193,13 @@ describe('uiCodemirror', function () {
193193 var element = $compile ( '<div><div ui-codemirror ng-model="foo"></div></div>' ) ( scope ) . children ( ) ;
194194
195195 expect ( element ) . toBeDefined ( ) ;
196- expect ( element . attr ( " class" ) ) . toEqual ( 'CodeMirror cm-s-default ng-pristine ng-valid' ) ;
196+ expect ( element . attr ( ' class' ) ) . toEqual ( 'CodeMirror cm-s-default ng-pristine ng-valid' ) ;
197197
198198 var value = 'baz' ;
199199 codemirror . setValue ( value ) ;
200200 expect ( scope . foo ) . toBe ( value ) ;
201201
202- expect ( element . attr ( " class" ) ) . toEqual ( 'CodeMirror cm-s-default ng-valid ng-dirty' ) ;
202+ expect ( element . attr ( ' class' ) ) . toEqual ( 'CodeMirror cm-s-default ng-valid ng-dirty' ) ;
203203
204204 } ) ;
205205
@@ -208,18 +208,18 @@ describe('uiCodemirror', function () {
208208 var element = $compile ( '<div><div ui-codemirror ng-model="foo"></div></div>' ) ( scope ) . children ( ) ;
209209
210210 expect ( element ) . toBeDefined ( ) ;
211- expect ( element . attr ( " class" ) ) . toEqual ( 'CodeMirror cm-s-default ng-pristine ng-valid' ) ;
211+ expect ( element . attr ( ' class' ) ) . toEqual ( 'CodeMirror cm-s-default ng-pristine ng-valid' ) ;
212212
213213 scope . $apply ( 'foo = "bar"' ) ;
214214 expect ( codemirror . getValue ( ) ) . toBe ( scope . foo ) ;
215215
216- expect ( element . attr ( " class" ) ) . toEqual ( 'CodeMirror cm-s-default ng-pristine ng-valid' ) ;
216+ expect ( element . attr ( ' class' ) ) . toEqual ( 'CodeMirror cm-s-default ng-pristine ng-valid' ) ;
217217 } ) ;
218218
219219
220220 it ( 'when the IDE changes should use ngChange' , function ( ) {
221221 scope . change = angular . noop ;
222- spyOn ( scope , " change" ) . andCallFake ( function ( ) { expect ( scope . foo ) . toBe ( 'baz' ) ; } ) ;
222+ spyOn ( scope , ' change' ) . andCallFake ( function ( ) { expect ( scope . foo ) . toBe ( 'baz' ) ; } ) ;
223223
224224 $compile ( '<div ui-codemirror ng-model="foo" ng-change="change()"></div>' ) ( scope ) ;
225225
@@ -239,7 +239,7 @@ describe('uiCodemirror', function () {
239239
240240 it ( 'should runs the onLoad callback' , function ( ) {
241241 scope . codemirrorLoaded = angular . noop ;
242- spyOn ( scope , " codemirrorLoaded" ) ;
242+ spyOn ( scope , ' codemirrorLoaded' ) ;
243243
244244 $compile ( '<div ui-codemirror="{onLoad: codemirrorLoaded}"></div>' ) ( scope ) ;
245245
0 commit comments