FazBrowse GitHub Viewer | Trending |
URL:
| Home
Tools: [Download Repo ZIP]   [Original HTTPS Page]

Support for PhantomJS stacktrace by mitar · Pull Request #77 · stacktracejs/stacktrace.js · GitHub

Repository navigation

Support for PhantomJS stacktrace - #77

Closed
mitar wants to merge 13 commits into
stacktracejs:masterfrom
peerlibrary:phantomjs
Closed

mitar wants to merge 13 commits into
stacktracejs:masterfrom
peerlibrary:phantomjs

Conversation

mitar commented Apr 24, 2014

Copy link
Copy Markdown

Fixes #76.

eriwen commented Apr 24, 2014

Copy link
Copy Markdown
Member

@mitar Code looks good, but could you please add tests?

mitar commented Apr 24, 2014

Copy link
Copy Markdown
Author

Not sure how I do that? Because tests are specific for PhantomJS?

eriwen commented Apr 24, 2014

Copy link
Copy Markdown
Member

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)

mitar commented Jul 5, 2014

Copy link
Copy Markdown
Author

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.

mitar commented Oct 10, 2014

Copy link
Copy Markdown
Author

Ping?

eriwen commented Oct 10, 2014

Copy link
Copy Markdown
Member

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.

mitar commented Oct 10, 2014

Copy link
Copy Markdown
Author

I don't understand why they would fail under PhantomJS, I made them to work under PhantomJS. :-)

eriwen commented Oct 11, 2014

Copy link
Copy Markdown
Member

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.

mitar commented Oct 11, 2014

Copy link
Copy Markdown
Author

Aha, that's what you mean. Hm, how could we fix that?

eriwen commented Oct 11, 2014

Copy link
Copy Markdown
Member

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:

Aha, that's what you mean. Hm, how could we fix that?

Reply to this email directly or view it on GitHub:
#77 (comment)

eriwen closed this May 1, 2015
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode characters
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Development

Successfully merging this pull request may close these issues.

Not normalized stack in PhantomJS

2 participants


Back | FazBrowse Home | New Git URL