@@ -118,7 +118,7 @@ describe('angular', function() {
118118
119119 it ( 'should throw an exception when source and destination are equivalent' , function ( ) {
120120 var src , dst ;
121- src = dst = { key : 'value' } ;
121+ src = dst = { key : 'value' } ;
122122 expect ( function ( ) { copy ( src , dst ) ; } ) . toThrowMinErr ( "ng" , "cpi" , "Can't copy! Source and destination are identical." ) ;
123123 src = dst = [ 2 , 4 ] ;
124124 expect ( function ( ) { copy ( src , dst ) ; } ) . toThrowMinErr ( "ng" , "cpi" , "Can't copy! Source and destination are identical." ) ;
@@ -223,7 +223,7 @@ describe('angular', function() {
223223
224224 it ( 'should omit properties from prototype chain' , function ( ) {
225225 var original , clone = { } ;
226- function Func ( ) { } ;
226+ function Func ( ) { }
227227 Func . prototype . hello = "world" ;
228228
229229 original = new Func ( ) ;
@@ -349,6 +349,7 @@ describe('angular', function() {
349349 } ) ;
350350
351351 it ( 'should correctly test for keys that are present on Object.prototype' , function ( ) {
352+ /* jshint -W001 */
352353 // MS IE8 just doesn't work for this kind of thing, since "for ... in" doesn't return
353354 // things like hasOwnProperty even if it is explicitly defined on the actual object!
354355 if ( msie <= 8 ) return ;
@@ -497,7 +498,7 @@ describe('angular', function() {
497498 expect ( toKeyValue ( { key : [ 323 , 'value' , true ] } ) ) . toEqual ( 'key=323&key=value&key' ) ;
498499 expect ( toKeyValue ( { key : [ 323 , 'value' , true , 1234 ] } ) ) .
499500 toEqual ( 'key=323&key=value&key&key=1234' ) ;
500- } ) ;
501+ } ) ;
501502 } ) ;
502503
503504
@@ -512,13 +513,14 @@ describe('angular', function() {
512513 var obj = new MyObj ( ) ,
513514 log = [ ] ;
514515
515- forEach ( obj , function ( value , key ) { log . push ( key + ':' + value ) } ) ;
516+ forEach ( obj , function ( value , key ) { log . push ( key + ':' + value ) ; } ) ;
516517
517518 expect ( log ) . toEqual ( [ 'bar:barVal' , 'baz:bazVal' ] ) ;
518519 } ) ;
519520
520521
521522 it ( 'should not break if obj is an array we override hasOwnProperty' , function ( ) {
523+ /* jshint -W001 */
522524 var obj = [ ] ;
523525 obj [ 0 ] = 1 ;
524526 obj [ 1 ] = 2 ;
@@ -546,7 +548,7 @@ describe('angular', function() {
546548 log = [ ] ;
547549
548550
549- forEach ( nodeList , function ( value , key ) { log . push ( key + ':' + value . innerHTML ) } ) ;
551+ forEach ( nodeList , function ( value , key ) { log . push ( key + ':' + value . innerHTML ) ; } ) ;
550552 expect ( log ) . toEqual ( [ '0:a' , '1:b' , '2:c' ] ) ;
551553 } ) ;
552554
@@ -561,7 +563,7 @@ describe('angular', function() {
561563 var htmlCollection = document . getElementsByName ( 'x' ) ,
562564 log = [ ] ;
563565
564- forEach ( htmlCollection , function ( value , key ) { log . push ( key + ':' + value . innerHTML ) } ) ;
566+ forEach ( htmlCollection , function ( value , key ) { log . push ( key + ':' + value . innerHTML ) ; } ) ;
565567 expect ( log ) . toEqual ( [ '0:a' , '1:c' ] ) ;
566568 } ) ;
567569
@@ -576,7 +578,7 @@ describe('angular', function() {
576578 var htmlCollection = document . querySelectorAll ( '[name="x"]' ) ,
577579 log = [ ] ;
578580
579- forEach ( htmlCollection , function ( value , key ) { log . push ( key + ':' + value . innerHTML ) } ) ;
581+ forEach ( htmlCollection , function ( value , key ) { log . push ( key + ':' + value . innerHTML ) ; } ) ;
580582 expect ( log ) . toEqual ( [ '0:a' , '1:c' ] ) ;
581583 } ) ;
582584 }
@@ -585,42 +587,42 @@ describe('angular', function() {
585587 var args ,
586588 log = [ ] ;
587589
588- ( function ( ) { args = arguments } ( 'a' , 'b' , 'c' ) ) ;
590+ ( function ( ) { args = arguments ; } ( 'a' , 'b' , 'c' ) ) ;
589591
590- forEach ( args , function ( value , key ) { log . push ( key + ':' + value ) } ) ;
592+ forEach ( args , function ( value , key ) { log . push ( key + ':' + value ) ; } ) ;
591593 expect ( log ) . toEqual ( [ '0:a' , '1:b' , '2:c' ] ) ;
592594 } ) ;
593595
594596 it ( 'should handle string values like arrays' , function ( ) {
595597 var log = [ ] ;
596598
597- forEach ( 'bar' , function ( value , key ) { log . push ( key + ':' + value ) } ) ;
599+ forEach ( 'bar' , function ( value , key ) { log . push ( key + ':' + value ) ; } ) ;
598600 expect ( log ) . toEqual ( [ '0:b' , '1:a' , '2:r' ] ) ;
599601 } ) ;
600602
601603
602604 it ( 'should handle objects with length property as objects' , function ( ) {
603605 var obj = {
604- 'foo' : 'bar' ,
605- 'length' : 2
606- } ,
607- log = [ ] ;
606+ 'foo' : 'bar' ,
607+ 'length' : 2
608+ } ,
609+ log = [ ] ;
608610
609- forEach ( obj , function ( value , key ) { log . push ( key + ':' + value ) } ) ;
611+ forEach ( obj , function ( value , key ) { log . push ( key + ':' + value ) ; } ) ;
610612 expect ( log ) . toEqual ( [ 'foo:bar' , 'length:2' ] ) ;
611613 } ) ;
612614
613615
614616 it ( 'should handle objects of custom types with length property as objects' , function ( ) {
615617 function CustomType ( ) {
616618 this . length = 2 ;
617- this . foo = 'bar'
619+ this . foo = 'bar' ;
618620 }
619621
620622 var obj = new CustomType ( ) ,
621623 log = [ ] ;
622624
623- forEach ( obj , function ( value , key ) { log . push ( key + ':' + value ) } ) ;
625+ forEach ( obj , function ( value , key ) { log . push ( key + ':' + value ) ; } ) ;
624626 expect ( log ) . toEqual ( [ 'length:2' , 'foo:bar' ] ) ;
625627 } ) ;
626628 } ) ;
@@ -790,7 +792,9 @@ describe('angular', function() {
790792 expect ( function ( ) {
791793 angularInit ( appElement , bootstrap ) ;
792794 } ) . toThrowMatching (
793- / \[ \$ i n j e c t o r : m o d u l e r r ] F a i l e d t o i n s t a n t i a t e m o d u l e d o e s n t e x i s t d u e t o : \n .* \[ \$ i n j e c t o r : n o m o d ] M o d u l e ' d o e s n t e x i s t ' i s n o t a v a i l a b l e ! Y o u e i t h e r m i s s p e l l e d t h e m o d u l e n a m e o r f o r g o t t o l o a d i t \. /
795+ new RegExp ( '\\[\\$injector:modulerr] Failed to instantiate module doesntexist due to:\\n' +
796+ '.*\\[\\$injector:nomod] Module \'doesntexist\' is not available! You either ' +
797+ 'misspelled the module name or forgot to load it\\.' )
794798 ) ;
795799 } ) ;
796800
@@ -818,7 +822,7 @@ describe('angular', function() {
818822 ) ;
819823
820824 dealoc ( document ) ;
821- } )
825+ } ) ;
822826 } ) ;
823827
824828
@@ -979,7 +983,9 @@ describe('angular', function() {
979983 expect ( function ( ) {
980984 angular . bootstrap ( element , [ 'doesntexist' ] ) ;
981985 } ) . toThrowMatching (
982- / \[ \$ i n j e c t o r : m o d u l e r r \] F a i l e d t o i n s t a n t i a t e m o d u l e d o e s n t e x i s t d u e t o : \n .* \[ \$ i n j e c t o r : n o m o d \] M o d u l e ' d o e s n t e x i s t ' i s n o t a v a i l a b l e ! Y o u e i t h e r m i s s p e l l e d t h e m o d u l e n a m e o r f o r g o t t o l o a d i t \. / ) ;
986+ new RegExp ( '\\[\\$injector:modulerr\\] Failed to instantiate module doesntexist due to:\\n' +
987+ '.*\\[\\$injector:nomod\\] Module \'doesntexist\' is not available! You either ' +
988+ 'misspelled the module name or forgot to load it\\.' ) ) ;
983989
984990 expect ( element . html ( ) ) . toBe ( '{{1+2}}' ) ;
985991 dealoc ( element ) ;
0 commit comments