Skip to content

expect.not.arrayContaining not working #5849

@philipp-winterle

Description

@philipp-winterle

Do you want to request a feature or report a bug?
Bug

What is the current behavior?
expect(atfRulesArr).toEqual(expect.not.arrayContaining(excludedSelectors));
Is the way it is explained in the docs but it is not working. I receive the following error:
TypeError: Cannot read property 'arrayContaining' of undefined

If the current behavior is a bug, please provide the steps to reproduce and
either a repl.it demo through https://repl.it/languages/jest or a minimal
repository on GitHub that we can yarn install and yarn test.

https://repl.it/@hummal/Jest-Bug-expectnotarrayContaining

What is the expected behavior?
It should work like written in the documentation or the documentation should be changed.

Please provide your exact Jest configuration
Default configuration. No special options.

Run npx envinfo --preset jest in your project directory and paste the
results here

npx: installed 1 in 1.663s

System:
OS: Linux 4.4
CPU: x64 Intel(R) Xeon(R) CPU E3-1505M v6 @ 3.00GHz
Binaries:
Node: 9.4.0
Yarn: 1.3.2
npm: 5.7.1
npmPackages:
jest:
wanted: ^22.4.2
installed: 22.4.2

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions