@@ -46,7 +46,6 @@ describe('Compile', function () {
4646 spyOn ( vm , '_bindDir' ) . and . callThrough ( )
4747 spyOn ( vm , '$eval' ) . and . callThrough ( )
4848 spyOn ( vm , '$interpolate' ) . and . callThrough ( )
49- spyWarns ( )
5049 } )
5150
5251 it ( 'normal directives' , function ( ) {
@@ -327,7 +326,7 @@ describe('Compile', function () {
327326 expect ( prop . parentPath ) . toBe ( 'a' )
328327 expect ( prop . mode ) . toBe ( bindingModes . TWO_WAY )
329328 // two way warn
330- expect ( hasWarned ( 'non-settable parent path' ) ) . toBe ( true )
329+ expect ( 'non-settable parent path' ) . toHaveBeenWarned ( )
331330 // literal with filter
332331 args = vm . _bindDir . calls . argsFor ( 3 )
333332 prop = args [ 0 ] . prop
@@ -585,7 +584,7 @@ describe('Compile', function () {
585584 }
586585 } )
587586 expect ( el . innerHTML ) . toBe ( '<div></div>' )
588- expect ( hasWarned ( 'attribute interpolation is not allowed in Vue.js directives' ) ) . toBe ( true )
587+ expect ( 'attribute interpolation is not allowed in Vue.js directives' ) . toHaveBeenWarned ( )
589588 } )
590589
591590 it ( 'attribute interpolation: warn mixed usage with v-bind' , function ( ) {
@@ -596,7 +595,7 @@ describe('Compile', function () {
596595 a : 'hi'
597596 }
598597 } )
599- expect ( hasWarned ( 'Do not mix mustache interpolation and v-bind' ) ) . toBe ( true )
598+ expect ( 'Do not mix mustache interpolation and v-bind' ) . toHaveBeenWarned ( )
600599 } )
601600
602601 it ( 'warn directives on fragment instances' , function ( ) {
@@ -612,10 +611,10 @@ describe('Compile', function () {
612611 }
613612 } )
614613 expect ( getWarnCount ( ) ) . toBe ( 1 )
615- expect (
616- hasWarned ( 'Attributes "id", "class" are ignored on component <test>' , true ) ||
617- hasWarned ( 'Attributes "class", "id" are ignored on component <test>' )
618- ) . toBe ( true )
614+ expect ( [
615+ 'Attributes "id", "class" are ignored on component <test>' ,
616+ 'Attributes "class", "id" are ignored on component <test>'
617+ ] ) . toHaveBeenWarned ( )
619618 } )
620619
621620 it ( 'should compile component container directives using correct context' , function ( ) {
0 commit comments