Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

expect.not.arrayContaining not working #5849

Closed
philipp-winterle opened this issue Mar 21, 2018 · 2 comments · Fixed by #5853
Closed

expect.not.arrayContaining not working #5849

philipp-winterle opened this issue Mar 21, 2018 · 2 comments · Fixed by #5853

Comments

@philipp-winterle
Copy link

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

@mattphillips
Copy link
Contributor

Hey @hummal this is the same issue as #5848. .not asymmetric matchers were added in #5517 but haven't been published yet. The docs for 22.4 need to be updated to reflect this.

@SimenB SimenB closed this as completed Mar 21, 2018
@mattphillips mattphillips mentioned this issue Mar 21, 2018
2 tasks
@github-actions
Copy link

This issue has been automatically locked since there has not been any recent activity after it was closed. Please open a new issue for related bugs.
Please note this issue tracker is not a help forum. We recommend using StackOverflow or our discord channel for questions.

@github-actions github-actions bot locked as resolved and limited conversation to collaborators May 12, 2021
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants