Skip to content

[test-runner-junit-reporter] JUnit reporter does not detect tests outside of "describe" suites #2901

Open
@JackRobards

Description

@JackRobards

Currently, if you have a test file like this:

it('under addition', function () {
  chai.expect(1 + 1).to.equal(2);
});

it('null hypothesis', function () {
  chai.expect(true).to.be.true;
});

it('asserts error', function () {
  chai.expect(false).to.be.true;
});

Then these test results will not be included in the XML file produced by the JUnit reporter package. The tests still run and can fail, so this format seems to be supported by the testing library without issue!

These tests will start being included in the report as soon as you wrap them in a describe block. Would it be possible to make it so the JUnit reporter can detect these tests that are not inside of a describe block?

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