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 package outdated (1.13.0 --> 22.0.3) #15

Open
ComFreek opened this issue Dec 23, 2017 · 2 comments
Open

expect package outdated (1.13.0 --> 22.0.3) #15

ComFreek opened this issue Dec 23, 2017 · 2 comments

Comments

@ComFreek
Copy link

ComFreek commented Dec 23, 2017

In a PR for scrape-it, I'd like to use expect(somehowBuildPromise()).resolves.toEqual(...) in a test. However, .resolves is only available in expect 20.0.0+. (Note that the NPM expect package has been merged with and is now part of Facebook's Jest multitude of packages, see jestjs/jest#1679.)

I have tried simply updating expect, but the new version already breaks tester's test because toBeA is not existent (anymore?) in Jest's expect. So upgrading expect would require bumping tester's major version number.

@IonicaBizau
Copy link
Owner

Interesting! Except the toBeA are the other things working? I see the expect npm package has no content anymore...

@ComFreek
Copy link
Author

I see the expect npm package has no content anymore...

Yeah, its NPM site confused me as well! You can find its code here: https://github.com/facebook/jest/tree/master/packages/expect.

For example, toEqual works fine for me in a clean directory with npm install expect, its code is here: https://github.com/facebook/jest/blob/0ce82e6365feb1012a1dd1a6ae230a8012d90679/packages/expect/src/matchers.js#L416
I also saw in the meantime that toBeA is a won't fix: jestjs/jest#2990

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants