-
-
Notifications
You must be signed in to change notification settings - Fork 6.5k
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
Optional jasmine 2 support #330
Conversation
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! |
Thank you for signing our Contributor License Agreement. We can now accept your code for this (and any) Facebook open source project. Thanks! |
+1 |
+1 |
Make Jasmine 2 support optional
@gagoman: there is a new pull request against your fork with some contributions for the open issues. Please check. |
More jasmine2 updates
…utput when combined with .not
Alright, I finally got around to spend time on this. This looks really good, @gagoman would you mind rebasing this on top of master before we continue? I'm sorry for causing this pain :( |
@gagoman Based on what @cpojer has said, should we look at removing Jasmine 1 and using Jasmine 2 exclusively. Let me know if you need any help. |
I think it is fine to add jasmine 2 support as an option. I'll think about the deprecation strategy for jasmine 1 later and when it makes sense to make jasmine 2 the default. Ideally we'll support any kind of test framework within jest in the future and we can split jasmine1 support out into a separate npm package. |
@cpojer ok, I'll rebase it in a next few days |
@gagoman did you get a chance to work on this? :) |
@cpojer I'm working on this. A lot of things changed in |
@cpojer Done. Please review, as I can forgot something, especially new additions to reporters. As for now I see one missing part:
|
@gagoman thank you so much! I'll take a look in a bit. I'm hoping to merge this for the December release with the new resolve (jest 0.8.0). |
Ok, as a first step I'm elevating jasmine-pit into the jest repo. There is no point in keeping it in a separate repo. Going to get code-review for this and push it out. I need to figure out how to deal with your diff. I'd like to make some changes to your pull request but I want the sync script to properly attribute you for your diff. I might merge your diff internally and make my changes in a separate diff. Thanks for all the hard work and I'm deeply sorry that it took forever for someone at FB to take a look at this. This is not ok and will not happen again. If you want to hang out with me and other people using jest online, feel free to join our channel on discord: http://facebook.github.io/jest/support.html :) |
@facebook-github-bot import |
Thanks for importing. If you are an FB employee go to https://our.intern.facebook.com/intern/opensource/github/pull_request/1663907390495818/int_phab to review. |
Awesome. This almost works internally. I have a couple of small modifications to your diff and will make a cleanup diff afterwards to make all of this fit into jest better. I'll try to land all of this tomorrow. |
@cpojer As for:
Will pass on Jasmine While:
Will pass on both versions. Jasmine |
Yeah it seems like there is something else going on internally that is unrelated to your changes. |
Can I help with any tasks related to this? |
Nope, I'm almost done! Going to merge it tomorrow when I get up. |
9c60191
It's happening! @gagoman thank you for your contribution. I'm deeply sorry it took so long for this to get merged. I have taken your implementation and polished it up a little bit in a follow-up. |
Summary: This polishes the jasmine2 integration from the open source PR ( #330 and D2662964 ): * Clean up the code, use const/let and classes (I think this is the last holdout in jest to use old patterns? Finally!). Also reformatted a bunch of code with an up-to-date code-style * Add a `testRunner` option to switch to jasmine2 and resolve the `<rootDir>` correctly (slightly messy, but I'll redo configs and this is how I want it to work in the end). * Moved a bunch of files around so they make more sense. Reorganized a bunch of stuff, this should now make it more apparent that the test runners are modular and can be switched out. In the future, we'll be able to do `npm install jest-jasmine2`, for example, to get jasmine support. * Removed the jasmine2 boot file, all of this can be inlined. * Changed package.json to run the jest tests both for jasmine1 and jasmine2 * Changed the CLI to add the name of the test runner * Snuck in a small change to the moduleMocker to add WeakMap to the default unmocked collections (cc yungsters). The plan is for jest 1.0 to switch to jasmine2 by default. public Reviewed By: voideanvalue Differential Revision: D2667164 fb-gh-sync-id: 025ccf685abb550a6eaf9e68c478bc718cba546c
This is really annoying. Our FB GitHub bot picked one user in this PR to give attribution to because it flattens everything into one commit. @gagoman if you'll accept I would like to send you a ReactJS tshirt as a thank you for pushing this change through for this entire time. Send your tshirt size, name and address to cpojer@fb.com. I'm going to be out of the office for the next 12 days but I'll make sure that you receive this by the end of the year. |
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. |
Good day.
This patch adds optional
jasmine 2.x
support tojest
.Benefits:
jasmine
is not modified, it can be updated any timedone
callback supportjasmine-2.x
TODOs:
jasmine-pit
jasmine 1.x
andjasmine 2.x
differencesPatches are welcome.