It takes too long to debug failing tests #1448
Comments
|
I'll add another complaint:
I don't think there'll be a silver bullet here, so much as we'll need to just refactor our way to a better place. Although I'd be very open to silver bullets if anyone has one handy :-) |
|
BTW the docs at [1] contain this gem: """ Which sounds like it's contributing to the problem here. |
Oh, that is a great find. Let's do this one right away! |
Hmm, I've not seen much benefit from this change yet. Perhaps I'm breaking the tests in the wrong way, or perhaps I've got my catches in the wrong place. Anyway, I'll come back to it again later, fwiw my changes so far are in the |
This what what I noticed happening in #1440, with the tests being nested, and modifying values in the mockRequest/mockDB, the test state does not get restored correctly for the next test. |
|
This is what I found last night: An exception thrown during the handler can be silently ignored, since it goes through hapi's I modified it so that I could see if there was an error (in my case, it was a function runTest (route, request, assertions) {
return new P(function (resolve, reject) {
route.handler(request, function (response) {
if (response instanceof Error) {
reject(response)
} else {
resolve(response)
}
})
})
.then(assertions)
}However, that still just sent the error back to |
|
This was fixed by #1537. |
|
yaaaaay |
This issue is inspired by @seanmonstar and @rfk in following passage from
#fxa:The same thing has been bugging me for a long time too. Until now I assumed it was just me.
My historical list of complaints, in order of significance, are:
npm testdoes, the line numbers get messed up.The text was updated successfully, but these errors were encountered: