When calling a function that wraps a describe, this.views is undefined #212

bmayen opened this Issue Apr 6, 2012 · 3 comments


None yet
3 participants

bmayen commented Apr 6, 2012

I'm trying to wrap a describe in a function to DRY up my tests. However, when I do this I get "this.views is undefined" on line 205 of jasmine-html.js. Adding a check for "typeof this.views !== 'undefined'" before this fixes the issue but I'm not confident this is the best place to address the bug.


ragaskar commented Apr 6, 2012

The scope with which your 'shared example' will be called depends on its location; without seeing exactly what code you have that is causing a problem I can only wonder if you actually need that scope present. What happens when you


inside your describe block? Is the problem fixed?

bmayen commented Apr 6, 2012

Thank you. That does work, but HTMLReporter piles all of the results from every call to it at the bottom of the report instead of within the test it was called from.


infews commented May 27, 2013

Thanks for the find. We think that the work we're doing on master cleans up this type of problem - leaking between the reporter and test execution.

If there's still an issue, please open a new issue.

infews closed this May 27, 2013

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment