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

JUnit reporter not reporting nested suites and/or tests correctly #869

Closed
jonnycornwell opened this issue Jan 10, 2018 · 0 comments
Closed

Comments

@jonnycornwell
Copy link
Contributor

Expected behavior

Report nested suites/tests when running unit tests in browsers and should look like:
image

Current behavior

Does not report any suites/tests within 'root' and report looks like:

image

Possible solution

I believe the cause of this is at this line, I assume the suite has been serialised/deserialised from the browser as JSON. Therefore the suite is a plain javascript object and not an instance of Suite, I have worked around this by patching the line to check for the presence of a tests property on the test object, see below

if (test.tests) {

Steps to reproduce (for bugs)

Using the intern tutorial I added the JUnit reporter and added the test below:

image

Environment

Intern version: 4.1.5
Node version: 6.11.4
NPM version: 5.2.0
Browser version: chrome 62

Additional information

Works as expected when using node as the environment

jonnycornwell pushed a commit to jonnycornwell/intern that referenced this issue Aug 17, 2018
- theintern#869
- Add failing unit test + associated fix
jonnycornwell pushed a commit to jonnycornwell/intern that referenced this issue Sep 11, 2018
- theintern#869
- Add failing unit test + associated fix
jonnycornwell added a commit to jonnycornwell/intern that referenced this issue Sep 11, 2018
- theintern#869
- Add failing unit test + associated fix
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

1 participant