@@ -51,7 +51,7 @@ describe('angular.scenario.SpecRunner', function() {
51
51
} ) ) ;
52
52
53
53
it ( 'should bind futures to the spec' , function ( ) {
54
- runner . addFuture ( 'test future' , function ( done ) {
54
+ runner . addFuture ( 'test future' , /** @this **/ function ( done ) {
55
55
this . value = 10 ;
56
56
done ( ) ;
57
57
} ) ;
@@ -72,7 +72,7 @@ describe('angular.scenario.SpecRunner', function() {
72
72
73
73
it ( 'should execute spec function and notify UI' , function ( ) {
74
74
var finished ;
75
- var spec = createSpec ( 'test spec' , function ( ) {
75
+ var spec = createSpec ( 'test spec' , /** @this **/ function ( ) {
76
76
this . test = 'some value' ;
77
77
} ) ;
78
78
runner . addFuture ( 'test future' , function ( done ) {
@@ -94,7 +94,7 @@ describe('angular.scenario.SpecRunner', function() {
94
94
it ( 'should execute notify UI on spec setup error' , function ( ) {
95
95
var finished ;
96
96
var spec = createSpec ( 'test spec' , function ( ) {
97
- throw 'message' ;
97
+ throw new Error ( 'message' ) ;
98
98
} ) ;
99
99
runner . run ( spec , function ( ) {
100
100
finished = true ;
@@ -128,9 +128,9 @@ describe('angular.scenario.SpecRunner', function() {
128
128
129
129
it ( 'should execute notify UI on step error' , function ( ) {
130
130
var finished ;
131
- var spec = createSpec ( 'test spec' , function ( ) {
131
+ var spec = createSpec ( 'test spec' , /** @this **/ function ( ) {
132
132
this . addFuture ( 'test future' , function ( done ) {
133
- throw 'error message' ;
133
+ throw new Error ( 'error message' ) ;
134
134
} ) ;
135
135
} ) ;
136
136
runner . run ( spec , function ( ) {
@@ -148,9 +148,9 @@ describe('angular.scenario.SpecRunner', function() {
148
148
149
149
it ( 'should run after handlers even if error in body of spec' , function ( ) {
150
150
var finished , after ;
151
- var spec = createSpec ( 'test spec' , function ( ) {
151
+ var spec = createSpec ( 'test spec' , /** @this **/ function ( ) {
152
152
this . addFuture ( 'body' , function ( done ) {
153
- throw 'error message' ;
153
+ throw new Error ( 'error message' ) ;
154
154
} ) ;
155
155
} ) ;
156
156
spec . after = function ( ) {
0 commit comments