Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

stack traces are too long for test libraries #63

Open
mgiuffrida opened this issue Jul 30, 2016 · 0 comments
Open

stack traces are too long for test libraries #63

mgiuffrida opened this issue Jul 30, 2016 · 0 comments

Comments

@mgiuffrida
Copy link
Contributor

Here is the stack trace from calling MockInteractions.tap(foo.$$('div')), all the way to foo's on-tap handler. From this fiddle: https://jsfiddle.net/mgiuffrida/vb4rbt6t/

TypeError: Cannot set property 'innerText' of null
    at x-foo.myDivTapped (VM90:48)
    at HTMLDivElement.handler (VM77 polymer.html:516)
    at HTMLElement.fire (VM77 polymer.html:1280)
    at Object.fire (VM77 polymer.html:852)
    at Object.forward (VM77 polymer.html:1149)
    at Object.click (VM77 polymer.html:1134)
    at HTMLDivElement.handleNative (VM77 polymer.html:742)
    at makeMouseEvent (mock-interactions.js:139)
    at click (mock-interactions.js:228)
    at Object.tap (mock-interactions.js:302)
    at testTap (VM90:55)

11 functions is the bare mininum because the handler isn't calling other functions. But error.stack in error handlers will get truncated to 10 lines by default. Error.stackTraceLimit sets this limit, so it can be increased, but it's a sane default.

It would be nice if MockInteractions and/or Polymer event handlers involved fewer steps.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant