Skip to content

Conversation

@akhomchenko
Copy link

Good day.

I'm working on patch for jest to allow usage of jasmine 2.x. This patch makes it possible, because there where some changes in async support.

I've also added UMD definiton.

Please check the code.

TODOs:

  • consider multi jasmine versions tests
  • add a note about jasmine-only (May be we should declare it as a dependency?)

P.S. I haven't tested it for jasmine-1.x

@akhomchenko
Copy link
Author

@jeffmo any notes on this?

@DmitrySoshnikov
Copy link
Collaborator

@gagoman, what's the state of this PR? The code looks good, shall we do something in addition before the merge?

@akhomchenko
Copy link
Author

@DmitrySoshnikov I haven't written more tests, sorry. Nonetheless this patch allowed me to run jest tests and they were ok.

index.js Outdated
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

What's up with this note, and why only s only for legacy?

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Jasmine 2.x has fitand fdescribe that serves the same purpose.

Note left because jasmine-pit doesn't depends on jasmine-only but uses it. I haven't changed dependencies in package.json

Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

But should we change the dependencies in the package.json nevertheless?

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yes. We have a dependency on jasmine-only, so it should be added. I'll add it to package.json

cpojer added a commit to cpojer/jest that referenced this pull request Nov 17, 2015
Summary: I merged jasmine-pit into jest because there is really no point in having it in a separate repo. If we decide to make jest more modular we should make `jest-jasmine` its own package within jest, which will allow us to move faster. This is the same that we did for jasmine-only.
I lifted the implementation from gagoman's pull request ( jeffmo/jasmine-pit#12 ) into the repo and modernized it for ES2015. (Thanks gagoman for working on this! All the credit goes to you!). This is a precursor to adding jasmine 2 support.

@public

Reviewed By: yungsters

Differential Revision: D2662889

fb-gh-sync-id: 220eb9f6d9699ac7924bf7c6d8b055d7273cc104
ghost pushed a commit to jestjs/jest that referenced this pull request Nov 18, 2015
Summary: Good day.

This patch adds optional `jasmine 2.x` support to `jest`.

Benefits:

* bundled `jasmine` is not modified, it can be updated any time
* `done` callback support
* whatever you need from `jasmine-2.x`

TODOs:

- [ ] make jeffmo/jasmine-pit#12 work, so I can remove dependency on my fork of `jasmine-pit`
- [x] extract base code for both runners
- [x] update matchers as I haven't tested them after update
- [x] fix all TODO's
- [x] add note about `jasmine 1.x` and `jasmine 2.x` differences

Patches are welcome.
Closes #330

Reviewed By: zpao

Differential Revision: D2662964

fb-gh-sync-id: 13e3b9116a350e46a0271f6ceb26cf2af316f20e
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

Successfully merging this pull request may close these issues.

2 participants