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

Run setupTestFrameworkScriptFile after extendJasmineExpect #1731

Merged
merged 1 commit into from
Sep 18, 2016

Conversation

0xR
Copy link
Contributor

@0xR 0xR commented Sep 17, 2016

Summary
This fixes #1730. Having setupTestFrameworkScriptFile run after extendJasmineExpect makes sure that it is possible to override global.expect to use another expectation library like chai.

Test plan
A demo of jest working with chai is here: 0xR/snapshot-experiments#1.

You can run npm test which will run the tests which have chai assertions. The integrate-chai fork of jest-jasmine2 is installed to demo that the codes solves the issue.

Future work
Document how to use jest with chai.

@ghost
Copy link

ghost commented Sep 17, 2016

Thank you for your pull request and welcome to our community. We require contributors to sign our Contributor License Agreement, and we don't seem to have you on file. In order for us to review and merge your code, please sign up at https://code.facebook.com/cla - and if you have received this in error or have any questions, please drop us a line at cla@fb.com. Thanks!

@ghost ghost added the CLA Signed ✔️ label Sep 17, 2016
@codecov-io
Copy link

codecov-io commented Sep 17, 2016

Current coverage is 90.17% (diff: 100%)

Merging #1731 into master will not change coverage

@@             master      #1731   diff @@
==========================================
  Files            31         31          
  Lines          1170       1170          
  Methods           0          0          
  Messages          0          0          
  Branches          0          0          
==========================================
  Hits           1055       1055          
  Misses          115        115          
  Partials          0          0          

Powered by Codecov. Last update ba12cfa...7124e55

@ghost
Copy link

ghost commented Sep 17, 2016

Thank you for signing our Contributor License Agreement. We can now accept your code for this (and any) Facebook open source project. Thanks!

@cpojer cpojer merged commit 4247e28 into jestjs:master Sep 18, 2016
@cpojer
Copy link
Member

cpojer commented Sep 18, 2016

Thank you @0xR, sorry that this was broken – definitely an oversight.

@github-actions
Copy link

This pull request 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 14, 2021
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Integrating chai doesn't work because expect(actual).not is accessed
3 participants