You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
describe('Demo of breaking skipped tests', () => {
it('executing test case', () => {
expect(true).toBe(true)
})
it.skip('skipped test case', () => {
expect(true).toBe(true)
})
})
gives following output when run
[0-0] TypeError in "Demo of breaking skipped tests.executing test case"
TypeError: Cannot destructure property 'id' of 'this.storage.getCurrentTest(...)' as it is null.
at Reporter.finishTest (/Users/krzysztof.biszta/ACME/acme-app/clients/node_modules/@reportportal/agent-js-webdriverio/src/reporter.ts:177:7)
at Reporter.onTestSkip (/Users/krzysztof.biszta/ACME/acme-app/clients/node_modules/@reportportal/agent-js-webdriverio/src/reporter.ts:154:10)
at Reporter.<anonymous> (/Users/krzysztof.biszta/ACME/acme-app/clients/node_modules/@reportportal/agent-js-webdriverio/node_modules/@wdio/reporter/build/index.js:154:18)
at Reporter.emit (node:events:526:28)
at Reporter.emit (node:domain:475:12)
at /Users/krzysztof.biszta/ACME/acme-app/clients/node_modules/@wdio/runner/build/reporter.js:36:56
at Array.forEach (<anonymous>)
at BaseReporter.emit (/Users/krzysztof.biszta/ACME/acme-app/clients/node_modules/@wdio/runner/build/reporter.js:36:25)
at MochaAdapter.emit (/Users/krzysztof.biszta/ACME/acme-app/clients/node_modules/@wdio/mocha-framework/build/index.js:257:24)
at Runner.emit (node:events:538:35)
at Runner.emit (node:domain:475:12)
at next (/Users/krzysztof.biszta/ACME/acme-app/clients/node_modules/mocha/lib/runner.js:759:14)
at next (/Users/krzysztof.biszta/ACME/acme-app/clients/node_modules/mocha/lib/runner.js:581:14)
at /Users/krzysztof.biszta/ACME/acme-app/clients/node_modules/mocha/lib/runner.js:591:7
at next (/Users/krzysztof.biszta/ACME/acme-app/clients/node_modules/mocha/lib/runner.js:474:14)
at Immediate.<anonymous> (/Users/krzysztof.biszta/ACME/acme-app/clients/node_modules/mocha/lib/runner.js:559:5)
The text was updated successfully, but these errors were encountered:
Hello, we have faced the same problem while testing same setup.
The problem comes from the fact that test is not started when it.skip is used. As a result the code goes to reporter.ts and calls onTestSkip method which calls finishTest and it fails because the storage object missing information about the current test.
The fix which we tried locally seems to work on first look. We have changed the following method from reporter.ts
Hey there,
found a strange issue, that reporter breaks on
it.skip(...)
having WebdriverIO set up with Mocha (which seems quite popular pair).Installed versions
agent-js-webdriverio:
^5.0.3
webdriverio:
^7.30.2
Sample code
gives following output when run
The text was updated successfully, but these errors were encountered: