busterjs / buster

Abandoned - A powerful suite of automated test tools for JavaScript.
http://docs.busterjs.org
Other
448 stars 37 forks source link

Guidance on modifying buster to filter AssertionError stacktrace #409

Open lgtout opened 10 years ago

lgtout commented 10 years ago

If I wanted to modify Buster such that, when an AssertionError occurs, the only lines shown in the stack trace output would be lines belonging to the "thing" being tested, or the test itself (filtering out all lines referencing buster or assertion framework code), where would I look in the buster source? Thanks much!

dwittner commented 10 years ago

Please have a look at http://docs.busterjs.org/en/latest/modules/buster-test/stack-filter/

dwittner commented 10 years ago

@jaabio, what is the current state? Have you made any progress?

lgtout commented 10 years ago

@dwittner

thanks for following up. i did take a look at the buster-test stack filter.

is it possible that the docs at the url you provided are out of date? i only had the buster npm package installed, so i installed the buster-test npm package to try out the instructions in the docs. (was that necessary, or is there some way of getting a reference to stackFilter with only the buster npm package installed?) it appears there is no longer a stackFilter field on buster-test. does that sound right?

lgtout commented 10 years ago

@dwittner

just did some more exploring and see that buster-test is actually included as a dependency of the buster npm package, which seems to indicate that installing buster-test separately wasn't necessary. is that correct? if so, do you know how i might be able to get a reference to the stackFilter from within a node file module that contains buster tests? or is stackFilter configurable globally? thanks.

dwittner commented 10 years ago

@jaabio, you are right. It seems the described way at http://docs.busterjs.org/en/latest/modules/buster-test/stack-filter/ isn't working at the moment, but it should. I will fix it asap and let you know.

lgtout commented 10 years ago

Excellent. Thanks! On May 20, 2014 4:31 AM, "Daniel Wittner" notifications@github.com wrote:

@jaabio https://github.com/jaabio, you are right. It seems the described way at http://docs.busterjs.org/en/latest/modules/buster-test/stack-filter/isn't working at the moment, but it should. I will fix it asap and let you know.

— Reply to this email directly or view it on GitHubhttps://github.com/busterjs/buster/issues/409#issuecomment-43614045 .