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 @@ -69,16 +69,17 @@ angular.scenario.dsl = angular.scenario.dsl || function(name, fn) {
69
69
*/
70
70
angular . scenario . matcher = angular . scenario . matcher || function ( name , fn ) {
71
71
angular . scenario . matcher [ name ] = function ( expected ) {
72
- var prefix = 'expect ' + this . future . name + ' ' ,
73
- not = this . inverse && 'not ' ;
72
+ var description = this . future . name +
73
+ ( this . inverse ? ' not ' : ' ' ) + name +
74
+ ' ' + angular . toJson ( expected ) ;
74
75
var self = this ;
75
- this . addFuture ( prefix + not + name + ' ' + angular . toJson ( expected ) ,
76
+ this . addFuture ( 'expect ' + description ,
76
77
function ( done ) {
77
78
var error ;
78
79
self . actual = self . future . value ;
79
80
if ( ( self . inverse && fn . call ( self , expected ) ) ||
80
81
( ! self . inverse && ! fn . call ( self , expected ) ) ) {
81
- error = 'expected ' + not + name + ' ' + angular . toJson ( expected ) +
82
+ error = 'expected ' + description +
82
83
' but was ' + angular . toJson ( self . actual ) ;
83
84
}
84
85
done ( error ) ;
You can’t perform that action at this time.
0 commit comments