Skip to content

(@wdio/jasmine-framework): attach asymmetric matchers to expect object#11820

Merged
erwinheitzman merged 2 commits intomainfrom
cb/asymmetric-matchers-jasmine
Dec 6, 2023
Merged

(@wdio/jasmine-framework): attach asymmetric matchers to expect object#11820
erwinheitzman merged 2 commits intomainfrom
cb/asymmetric-matchers-jasmine

Conversation

@christian-bromann
Copy link
Member

Proposed changes

Asymmetric matchers are registered to the jasmine namespace in Jasmine, see https://jasmine.github.io/api/edge/jasmine.html#.any. However in our docs we often the ones attached to expect directly which is how the expect lib is doing it.

This patch makes both ways work in Jasmine.

fixes #11817

Types of changes

  • Bugfix (non-breaking change which fixes an issue)
  • New feature (non-breaking change which adds functionality)
  • Breaking change (fix or feature that would cause existing functionality to not work as expected)
  • Documentation update

Checklist

  • I have read the CONTRIBUTING doc
  • I have added tests that prove my fix is effective or that my feature works
  • I have added necessary documentation (if appropriate)
  • I have added proper type definitions for new commands (if appropriate)

Further comments

n/a

Reviewers: @webdriverio/project-committers

@christian-bromann christian-bromann added the PR: Bug Fix 🐛 PRs that contain bug fixes label Dec 6, 2023
@christian-bromann christian-bromann force-pushed the main branch 2 times, most recently from 19697d0 to c9a3908 Compare December 6, 2023 20:16
Copy link
Member

@erwinheitzman erwinheitzman left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Nice one! 😎

@erwinheitzman erwinheitzman merged commit 194bda2 into main Dec 6, 2023
@christian-bromann christian-bromann deleted the cb/asymmetric-matchers-jasmine branch December 6, 2023 20:56
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

PR: Bug Fix 🐛 PRs that contain bug fixes

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[🐛 Bug]: TypeError: globals.get(...)[matcher] is not a function

2 participants