File tree Expand file tree Collapse file tree 1 file changed +5
-4
lines changed
Expand file tree Collapse file tree 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) {
6969 */
7070angular . scenario . matcher = angular . scenario . matcher || function ( name , fn ) {
7171 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 ) ;
7475 var self = this ;
75- this . addFuture ( prefix + not + name + ' ' + angular . toJson ( expected ) ,
76+ this . addFuture ( 'expect ' + description ,
7677 function ( done ) {
7778 var error ;
7879 self . actual = self . future . value ;
7980 if ( ( self . inverse && fn . call ( self , expected ) ) ||
8081 ( ! self . inverse && ! fn . call ( self , expected ) ) ) {
81- error = 'expected ' + not + name + ' ' + angular . toJson ( expected ) +
82+ error = 'expected ' + description +
8283 ' but was ' + angular . toJson ( self . actual ) ;
8384 }
8485 done ( error ) ;
You can’t perform that action at this time.
0 commit comments