Skip to content

Feat: Maybe do something with nested suites? #4

@itsfrank

Description

@itsfrank

Currently suites can be nested and they work, e.g.:

test.suite("A collection of test cases", function()
    test.case("case 1", function()
        check.is_true(false)
    end)

    test.suite("A nested suite", function()
        test.case("Case in a nested suite", function()
            check.is_true(false)
        end)
    end)
end)

This actually works fine, but there is no indication of the nesting in the output:

Screenshot 2024-11-05 at 10 52 23 AM

Would need to figure out 2 things:

  1. How to nicely report this, e.g. indent 1 level further? Combine suite names? etc..
  2. Interaction with focus/skip
    I think the most sensible way is for nested suites to inherit parent's focus/skip state?
    Focus in a nested suite should certainly not run parent suite's tests

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions