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

Nested describe blocks not printed #10

Open
kfatehi opened this issue Jul 27, 2014 · 3 comments
Open

Nested describe blocks not printed #10

kfatehi opened this issue Jul 27, 2014 · 3 comments

Comments

@kfatehi
Copy link

kfatehi commented Jul 27, 2014

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?

@rprieto
Copy link
Owner

rprieto commented Jul 29, 2014

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?

@kfatehi
Copy link
Author

kfatehi commented Jul 29, 2014

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

@kfatehi
Copy link
Author

kfatehi commented Jul 29, 2014

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

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

2 participants