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

Reporters do not have complete information #9

Open
gian1200 opened this issue Sep 18, 2024 · 1 comment
Open

Reporters do not have complete information #9

gian1200 opened this issue Sep 18, 2024 · 1 comment

Comments

@gian1200
Copy link

gian1200 commented Sep 18, 2024

Has web-test-runner-jasmine been tested with @web/test-runner-junit-reporter and @web/test-runner-junit-reporter

I'm currently facing some issues (modernweb-dev/web#2780).

Could it be related to these lines in web-test-runner-jasmine?

allSpecs.push({
name: e.description,
passed: e.passed,
});

jasmineDone: result => {
sessionFinished({
passed: result.overallStatus === 'passed',
errors: [...failedSpecs, ...failedImports],
testResults: {
name: '',
suites: [],
tests: allSpecs,
},
});
},

If I understand correctly, when success, there is not much info returned.

@gian1200
Copy link
Author

gian1200 commented Sep 18, 2024

Also, not sure if a regresion or a new bug. For some reason e.description is always undefined.
Also fails with single or without describe

describe("foo", () => {
	describe("bar", () => {
		it("should pass", () => {
			expect(true).toBeTruthy();
		});
	});
	describe("bar-false", () => {
		it("should fail", () => {
			expect(false).toBeTruthy();
		});
	});
});

image

Update:

Lines 63 and 72 should be result.description instead of e.description. e is of type Expectation, not SpecResult.

Also, it'd be nice to also implement suiteDone method and complete information of testResults to fix reporters.

I'll try to do a PR if I get some free time.

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