-
Notifications
You must be signed in to change notification settings - Fork 20
Throw err when beforeEach.withApp is not called #37
Conversation
Can one of the admins verify this patch? To accept patch and trigger a build add comment ".ok\W+to\W+test." |
@slnode ok to test |
@@ -225,6 +225,10 @@ _describe.whenCalledRemotely = function(verb, url, data, cb) { | |||
urlStr = '/<dynamic>'; | |||
} | |||
|
|||
if (this.request === undefined) { | |||
throw new Error('App is not specified. Please use lt.beforeEach.withApp to specify the app.'); | |||
} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
In your code, this
points to _describe
. However, the request
variable is set on the beforeEach
context provided by Mocha.
You need to move this check into beforeEach
few lines below.
Also make sure that
|
Damn, I can't believe I never wrote test for this. I guess I missed it in the rush... I'll add a test for this and fix the problem with it. |
f2d4fef
to
18996be
Compare
Actually I just realized it's not possible to test this cleanly(maybe that's why I didn't write it initially). I force pushed the fixed version. |
18996be
to
c7f91b0
Compare
Yeah, I have realised the same, that's why I didn't asked you to write a test :)
Thanks. |
Throw err when beforeEach.withApp is not called
Landed and released as |
The error that is thrown when lt.beforeEach.withApp is called is cryptic and new users of this module, may not understand what's going on.