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

What is the purpose for this test state determination logic? #102

Open
naomi-sharif opened this issue May 28, 2024 · 0 comments
Open

What is the purpose for this test state determination logic? #102

naomi-sharif opened this issue May 28, 2024 · 0 comments

Comments

@naomi-sharif
Copy link

Hello 👋

I'm confused about the following logic for determining the test state upon the test ending.

Why is the default state PASSED?

When prepending an event listener to the EVENT_SUITE_END event, I noticed the tests within the suite would have the status of undefined. Is this the reason for the logic? If so, why is it the case that the test statuses are undefined when the suite has ended?

onTestFinish(test) {
const status = test.state || (test.pending && testStatuses.SKIPPED) || testStatuses.PASSED;
this.finishTest(test, status);
}

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