blueprintui / web-test-runner-jasmine

Plugin for using Jasmine with Web Test Runner
MIT License
8 stars 5 forks source link

Reporters do not have complete information #9

Open gian1200 opened 2 months ago

gian1200 commented 2 months ago

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 (https://github.com/modernweb-dev/web/issues/2780).

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

https://github.com/blueprintui/web-test-runner-jasmine/blob/6f8531012e5fe9172d445a0dec282067b730ebc6/src/index.ts#L62-L65

https://github.com/blueprintui/web-test-runner-jasmine/blob/6f8531012e5fe9172d445a0dec282067b730ebc6/src/index.ts#L80-L90

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

gian1200 commented 2 months ago

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.