-
-
Notifications
You must be signed in to change notification settings - Fork 2.7k
Closed
Labels
Bug 🐛help wantedIssues that are free to take by anyone interestedIssues that are free to take by anyone interested
Description
Have you read the Contributing Guidelines on issues?
- I have read the Contributing Guidelines on issues.
WebdriverIO Version
v9.15.0
Node.js Version
v22.12.0
Mode
WDIO Testrunner
Which capabilities are you using?
What happened?
A test that calls pending() inside an it() block is incorrectly reported as passed by the WDIO v9 spec reporter.
What is your expected behavior?
The test should be reported as skipped in the WDIO test summary.
How to reproduce the bug.
Create a file with the following code:
describe('Tests', () => {
it('Test Pending', async () => {
pending('This test is pending and will not run.');
console.log('Test Pending');
}, 10 * 60_000);
xit('Test Skipped', async () => {
console.log('Test Skipped');
}, 10 * 60_000);
it('Test Regular', async () => {
console.log('Test Regular');
expect(true).toBe(true);
}, 10 * 60_000);
});
Minimal reproduction Github project: https://github.com/amoscmc/wdio-v9-jasmine-pending-bug
Relevant log output
[chrome 138.0.7204.49 linux #0-0] Tests
[chrome 138.0.7204.49 linux #0-0] ✓ Test Pending
[chrome 138.0.7204.49 linux #0-0]
[chrome 138.0.7204.49 linux #0-0] .........Pending Reasons.........
[chrome 138.0.7204.49 linux #0-0] Temporarily disabled with xit
[chrome 138.0.7204.49 linux #0-0] - Test Skipped
[chrome 138.0.7204.49 linux #0-0] ✓ Test Regular
[chrome 138.0.7204.49 linux #0-0]
[chrome 138.0.7204.49 linux #0-0] 2 passing (80ms)
[chrome 138.0.7204.49 linux #0-0] 1 skippedCode of Conduct
- I agree to follow this project's Code of Conduct
Is there an existing issue for this?
- I have searched the existing issues
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
Bug 🐛help wantedIssues that are free to take by anyone interestedIssues that are free to take by anyone interested