-
-
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
9.19.2
Node.js Version
22.17.0
Mode
WDIO Testrunner
Which capabilities are you using?
browserName: 'chrome',
'goog:chromeOptions': {
args: ['headless', 'disable-gpu']
}What happened?
We are using an afterTest(test, context, result) Hook in combination with @wdio/jasmine-framework. When the installed version of jsamine is 5.10.0 the first hook argument 'test' is always {} instead of the test object. With jasmine 5.9.0 the issue does not happen.
What is your expected behavior?
afterTest Hook should be called with the expected arguments, regardless of the valid, installed jasmine version, according to package.json '^5.0.0'
How to reproduce the bug.
git clone https://github.com/webdriverio/jasmine-boilerplate.git
cd jasmine-boilerplate
rm package-lock.json
npm i
npm why jasmine should output a version of jasmine >=5.10.0
jasmine@5.10.0 dev
node_modules/jasmine
jasmine@"^5.0.0" from @wdio/jasmine-framework@9.19.2
node_modules/@wdio/jasmine-framework
dev @wdio/jasmine-framework@"9.19.2" from the root project
In wdio.shared.conf.ts uncomment and change afterTest() to:
afterTest: function(test, context, { error, result, duration, passed, retries }) {
console.assert(Object.keys(test).length !== 0, 'test object in afterTest Hook should not be empty.');
},npm run test:local should not output:
Assertion failed: test object in afterTest Hook should not be empty.
Relevant log output
See 'How to reproduce the bug'.Code 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