supersamples
supersamples copied to clipboard
Nested describe blocks not printed
Example tests:
describe("POST /session", function () {
it("rejects invalid credentials")
describe("local auth provider", function() {
it("returns a new auth token")
});
});
I am currently using the HTML reporter. When I generate samples, I see the following:
Notice now that the "it" label "rejects invalid credentials" is there as the sample description and it looks good.
The problem comes in when you begin nesting describe blocks semantically ought to be a part of the sample description.
Hence my expectation here is that rather than see "returns a new auth token" I should see "local auth provider returns a new auth token"
Just to give a little more context, my next test describes "github auth provider" with similar assertions, so things get confusing. Is there a simple way to bring in that additional "describe" context as part of the sample description?
Hi,
You're correct, supersamples processes all describes, but actually only uses the first 2 levels to create the left-hand navigation. In your case I assume you have another top-level describe
not mentioned above?
Would you expect that
- the
local auth provider
describe should also be part of the navigation - or that it should just be printed above the
returns a new auth token
test?
I think it should just be printed above, as the Mocha Spec reporter does it. Hence maybe it becomes an unordered list where the leaf is 'returns a new auth token' ... What do you think? Thanks btw
Above meaning not in the sidebar which seems to be already setup a certain way I'm not sure we should give it more opportunities to become wide with user added text