Skip to content

Changes in nesting of describe causes unexpected changes in reporting #144

@pete-murphy

Description

@pete-murphy
main :: Effect Unit
main = Aff.launchAff_ do
  Runner.runSpec [ Reporter.consoleReporter ] do
    Spec.describe "A" do
      Spec.it "should be under A" (pure unit)
    Spec.describe "B" do
      Spec.describe "B-1" do
        Spec.it "should be under B-1" (pure unit)
    Spec.describe "C" do
      Spec.it "should be under C" (pure unit)

produces the following summary as expected

Running tests for package: spec-nested-describe-bug
A
  ✓︎ should be under A
B » B-1
  ✓︎ should be under B-1
C
  ✓︎ should be under C

Summary
3/3 tests passed

However, removing the Spec.describe "B-1" block

main :: Effect Unit
main = Aff.launchAff_ do
  Runner.runSpec [ Reporter.consoleReporter ] do
    Spec.describe "A" do
      Spec.it "should be under A" (pure unit)
    Spec.describe "B" do
      Spec.it "should be under B" (pure unit)
    Spec.describe "C" do
      Spec.it "should be under C" (pure unit)

the other top level blocks are collapsed so everything is under "A"

Running tests for package: spec-nested-describe-bug
A
  ✓︎ should be under A
  ✓︎ should be under B
  ✓︎ should be under C

Summary
3/3 tests passed

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions