Skip to content

Commit e686419

Browse files
committed
[exercises/runner.js] Avoid printing of 'fx.apply is not a function' when already detected user did not export a function.
1 parent e48d16a commit e686419

File tree

1 file changed

+3
-2
lines changed

1 file changed

+3
-2
lines changed

exercises/runner.js

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -26,8 +26,9 @@ function runner() {
2626
}
2727

2828
if (typeof submittedFx !== 'function') {
29-
this.emit('fail', __('fail.must_export_function'))
30-
return callback(null, false)
29+
var message = __('fail.must_export_function')
30+
this.emit('fail', message)
31+
return callback(new Error(message), false)
3132
}
3233

3334
callback(null, true)

0 commit comments

Comments
 (0)