| FazBrowse GitHub Viewer | Trending | | Home |
| Tools: [Download Repo ZIP] [Original HTTPS Page] |
|
@mitar Code looks good, but could you please add tests? |
Sorry, something went wrong.
|
Not sure how I do that? Because tests are specific for PhantomJS? |
Sorry, something went wrong.
|
I'd suggest you add an example exception to https://github.com/stacktracejs/stacktrace.js/blob/master/test/CapturedExceptions.js and unit tests around the 'phantomjs' mode (e.g. https://github.com/stacktracejs/stacktrace.js/blob/master/test/TestStacktrace.js#L89) and the parsing of the example exception you provide in CapturedExceptions.js (e.g. https://github.com/stacktracejs/stacktrace.js/blob/master/test/TestStacktrace.js#L421) |
Sorry, something went wrong.
|
I added sample exception for PhantomJS and one test. But testing for mode is not possible because it is not really possible to determine which browser it is based on exception itself (it looks very similar to Safari based on fields, just stack format is different) so looking into the name of the browser is needed. |
Sorry, something went wrong.
Ignore directory 'test' in bower.json
…trace -> stacktracejs/stacktrace.js.
…s) to improve usability in a testing environment.
|
Ping? |
Sorry, something went wrong.
|
The tests fail when running under PhantomJS (though they pass in other browsers) because of the navigator.userAgent check. I wonder if there's a better way to detect a PhantomJS stack. |
Sorry, something went wrong.
|
I don't understand why they would fail under PhantomJS, I made them to work under PhantomJS. :-) |
Sorry, something went wrong.
|
From the project root run: /usr/bin/env DISPLAY=:1 phantomjs test/lib/phantomjs-qunit-runner.js test/TestStacktrace.html The phantomjs mode tests succeed but the others (like chrome) fail because phantomjs is checked first. |
Sorry, something went wrong.
|
Aha, that's what you mean. Hm, how could we fix that? |
Sorry, something went wrong.
|
This is exactly the kind of problem we're addressing with stacktrace.js 1.0. It's not done yet, but perhaps you can give it a try. It may work sufficiently for your use case. On Fri, Oct 10, 2014 at 8:01 PM, Mitar notifications@github.com wrote:
|
Sorry, something went wrong.
| Back | FazBrowse Home | New Git URL |
Fixes #76.