Skip to content

[🐛 Bug]: Jest .not modifier assertion no longer working #10606

@ashil88

Description

@ashil88

Have you read the Contributing Guidelines on issues?

WebdriverIO Version

8.11.2

Node.js Version

18.16.0

Mode

WDIO Testrunner

Which capabilities are you using?

No response

What happened?

After updating to v8.11.2 previous passing negative assertions
await expect(someString).not.toContain(subString);
await expect(someVal).not.toBe(someOtherValue);

are now failing with the following error
TypeError: fn(...).negativeCompare is not a function

Possibly related to this PR #10533

What is your expected behavior?

These tests should continue to pass as before.

How to reproduce the bug.

Upgrade to 8.11.2 and test negative assertion
await expect(someString).not.toContain(subString);

Relevant log output

`TypeError: fn(...).negativeCompare is not a function`

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

Metadata

Metadata

Assignees

No one assigned

    Labels

    Bug 🐛good first picka reasonable task to start getting familiar with the code basehelp wantedIssues that are free to take by anyone interested

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions