Closed jamesstacyjones closed 2 years ago
When I look at the source code (snippet below). @shairez I think we can use error.toString()
combined with ${CONTEXT_FOR_GWT_ERROR} ${originFunctionName}():
Therefore:
throw new Error(`${CONTEXT_FOR_GWT_ERROR} ${originFunctionName}(): \n${error}`);
After trying to implement. I made some changes deviating from first proposal. Now we should see original stack trace and error message. (this will help alot with debugging where the issue actually is)
Thanks for the report @jamesstacyjones and thanks for figuring how to solve it @WynieCronje
appreciate it!
I'll check out the PR now, thanks
Handling of Error message ... here is my package.json
package.json.txt
Basically in the first describe with given like so:
Then in the constructor of the component is this
Then the error message looks like this for Given
If you change it to beforeEach then you get this error:
So I tracked it down in the jasmine-given.js ... and this is the error message give by the given:
** here is the code for given function throwErrorWithContext
My thinking is that you could probably check for
error.message
and modify accordingly but of course since I am not sure why the promise is resolving with a different error message that would be my first thought. I know that is not the greatest context but hopefully it will lead you in the right direction.