File tree 1 file changed +5
-4
lines changed
1 file changed +5
-4
lines changed Original file line number Diff line number Diff line change @@ -74,16 +74,17 @@ angular.scenario.dsl = angular.scenario.dsl || function(name, fn) {
74
74
*/
75
75
angular . scenario . matcher = angular . scenario . matcher || function ( name , fn ) {
76
76
angular . scenario . matcher [ name ] = function ( expected ) {
77
- var prefix = 'expect ' + this . future . name + ' ' ,
78
- not = this . inverse && 'not ' ;
77
+ var description = this . future . name +
78
+ ( this . inverse ? ' not ' : ' ' ) + name +
79
+ ' ' + angular . toJson ( expected ) ;
79
80
var self = this ;
80
- this . addFuture ( prefix + not + name + ' ' + angular . toJson ( expected ) ,
81
+ this . addFuture ( 'expect ' + description ,
81
82
function ( done ) {
82
83
var error ;
83
84
self . actual = self . future . value ;
84
85
if ( ( self . inverse && fn . call ( self , expected ) ) ||
85
86
( ! self . inverse && ! fn . call ( self , expected ) ) ) {
86
- error = 'expected ' + not + name + ' ' + angular . toJson ( expected ) +
87
+ error = 'expected ' + description +
87
88
' but was ' + angular . toJson ( self . actual ) ;
88
89
}
89
90
done ( error ) ;
You can’t perform that action at this time.
0 commit comments