@@ -131,7 +131,7 @@ describe('UserCodeRunner', () => {
131
131
const { error, result } = await UserCodeRunner . run ( this . options )
132
132
expect ( error ) . to . be . instanceof ( Error )
133
133
expect ( error . message ) . to . eql (
134
- 'function timed out after 100 milliseconds'
134
+ 'function timed out, ensure the callback is executed within 100 milliseconds'
135
135
)
136
136
expect ( result ) . to . eql ( undefined )
137
137
} )
@@ -204,7 +204,7 @@ describe('UserCodeRunner', () => {
204
204
} )
205
205
} )
206
206
207
- describe ( 'function times out' , ( ) => {
207
+ describe ( 'promise times out' , function ( ) {
208
208
beforeEach ( function ( ) {
209
209
this . options . fn = function ( ) {
210
210
return Promise . resolve ( 'result' ) . delay ( 200 )
@@ -215,7 +215,7 @@ describe('UserCodeRunner', () => {
215
215
const { error, result } = await UserCodeRunner . run ( this . options )
216
216
expect ( error ) . to . be . instanceof ( Error )
217
217
expect ( error . message ) . to . eql (
218
- 'function timed out after 100 milliseconds'
218
+ 'function timed out, ensure the promise resolves within 100 milliseconds'
219
219
)
220
220
expect ( result ) . to . eql ( undefined )
221
221
} )
0 commit comments