Scott Santucci

Results 125 comments of Scott Santucci
trafficstars

Hmm... The output is definitely weird; it's not just got the wrong indentation in the next suite, it's actually missing the contents of the `tabs` suite, except for the name...

:thinking: I've had to block out some time to work this one out, but I actually think the only thing Mocha's got wrong here is less-than-perfect reporting of the error....

Re. that last idea, keep in mind that typo'd function calls are an error but typo'd properties are just `undefined`, which may or may not be easy to discover depending...

In general, most of these seem like they could be made to work with local variables *with sufficient restructuring* -- for instance: ```javascript describe("case 1", function() { var makeUserFunction =...

The issue I was pointing out with `setupMockResponse` was that it's only called in the outer `before`, therefore (unless I'm seriously misaken) it will only run once, therefore even if...

Well, that's a lot of good thoughts I'm going to have to chew over; thanks. 8^) I took another look at that one example given the understanding that that one...

Indeed, not only is `this` useless inasmuch as it's just a broken version of a suite-local variable (EDITTED TO ADD: actually, this is only true of hooks, see next comment...

Here's a quick question: If what you want, ultimately, is for functions to provide on-demand (well, not doing the work unless they're used) some resources that are initialized new for...

Version with the more complete example: ```js function passesSharedSpecs() { it("does something every context should do", function() { expect(mockApi.findRequest).to.include(this.testableThing().properties); }); } describe("case 2", function() { this.ctx.thingOptions = {version: 1}; this.ctx.testableThing...

So, my personal opinions on how best to do this, on the assumption that "actually call the functions from the test that needs them so they can use `this` as...