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

Consider upgrading to Jasmine 2 #74

Closed
n1k0 opened this issue Jun 15, 2014 · 42 comments
Closed

Consider upgrading to Jasmine 2 #74

n1k0 opened this issue Jun 15, 2014 · 42 comments
Assignees

Comments

@n1k0
Copy link

n1k0 commented Jun 15, 2014

Async support in Jasmine 1.3 is pretty poor, this has been fixed in version 2 of the framework. Maybe we should consider upgrading to that version.

@chenglou
Copy link
Contributor

👍

@johanneslumpe
Copy link

This would be great - being able to use done() for async testing would really be welcome!

@odf
Copy link

odf commented Oct 22, 2014

Any news on that? Ironically, I've found that exactly the tests I moved from plain Jasmine to Jest for in order to simplify my tooling - CSP code that requires ES6 generators - don't work any longer.

@emorikawa
Copy link

👍

@osdiab
Copy link

osdiab commented Nov 9, 2014

I agree! 👍 done() makes async tests so much nicer.

@osdiab osdiab mentioned this issue Nov 9, 2014
@messfromspace
Copy link

👍 I actively use CSP (via js-csp), so it would be pretty nice if I could do something like this:

go(function *() {
  var value;
  value = yield take(makeAsyncThing());
  expect(value).toEqual('whatever');
  done();
});

@NoumanSaleem
Copy link

👍 +1

@roderickhsiao
Copy link

👍 @jeffmo How do you think

@lo1tuma
Copy link

lo1tuma commented Dec 22, 2014

👍

2 similar comments
@cirocosta
Copy link

👍

@ncuillery
Copy link
Contributor

👍

@fdubost
Copy link

fdubost commented Jan 8, 2015

Yeah, we need it! 👍

@kennydee
Copy link

kennydee commented Jan 9, 2015

👍

3 similar comments
@oziks
Copy link

oziks commented Jan 9, 2015

👍

@cmeiller
Copy link

cmeiller commented Jan 9, 2015

👍

@axross
Copy link

axross commented Jan 16, 2015

👍

@randymorris
Copy link

Upgrading to Jasmine 2 would also fix equality issues like the one demonstrated here: https://gist.github.com/randymorris/439a85bccc856ca4e8c1.

@robrobbins
Copy link

(thumbsup)
(plusone)
etc...

@robrobbins
Copy link

related question: Has anyone dropped in 2.x to see what happens? may not be too bad to fix. OSS and all... (puts on todo list)

@bartgryszko
Copy link
Contributor

👍

2 similar comments
@pedroteixeira
Copy link

👍

@rosko
Copy link

rosko commented Feb 20, 2015

👍

@tewen
Copy link

tewen commented Mar 4, 2015

@robrobbins Tried that yesterday. Wanted to limit the amount of time I spent doing it (time boxed to an hour). It's not a simple replacement. I also realized (shortly after) that the jest team would have done this if it was that easy.

👍

@zupzup
Copy link

zupzup commented Mar 16, 2015

👍

2 similar comments
@Cellule
Copy link

Cellule commented Mar 17, 2015

👍

@zol
Copy link

zol commented Apr 2, 2015

👍

@jeffmo
Copy link
Contributor

jeffmo commented Apr 2, 2015

Just wanted to follow up here to say that I don't have any immediate plans to build out Jasmine2 support, but only for lack of cycles myself. However, if someone wanted to take a crack at building a jasmine2TestRunner, I'd happily take a PR for such a thing.

You can take a look at the existing jasmineTestRunner:
https://github.com/facebook/jest/blob/master/src/jasmineTestRunner/jasmineTestRunner.js

It should be possible to build a jasmine2TestRunner that matches the same API as that runner function. Then it'll be easy to toggle between the two test runners (and even other test runners!) via this config option:

https://github.com/facebook/jest/blob/master/src/lib/utils.js#L29

@akhomchenko
Copy link

Here is WIP update to jasmine 2.x: #330

Help wanted.

@MattyKuzyk
Copy link

I was struggling for an hour wondering why my done() wasn't working... ;__;

@akhomchenko
Copy link

Optional Jasmine 2.x support was added to #330

Thx to @tomv564

@ghost
Copy link

ghost commented Aug 4, 2015

Thank you for reporting this issue and appreciate your patience. We've notified the core team for an update on this issue. We're looking for a response within the next 30 days or the issue may be closed.

@chikamichi
Copy link

Well, sir Bot, it's quite a relevant issue still 🍰 but human beings seem to be aware of that wrt #330

@cpojer cpojer self-assigned this Sep 29, 2015
@cpojer
Copy link
Member

cpojer commented Sep 29, 2015

Yes yes, we are working on this. There is a lot of work that we need to do to make jest awesome and I'm still working through the backlog of things we need to do at Facebook. Please have a little bit more patience and I will make sure jest is great soon!

(I assigned this issue to me, hoping that will shut up our bot. cc @vjeux)

@chikamichi
Copy link

Oh I'm very patient @cpojer, I just wanted to interact with that inquiring bot of yours :)

@cpojer
Copy link
Member

cpojer commented Nov 19, 2015

jest 0.8.0 was published just now with optional jasmine2 support! Thanks everyone and I'm deeply sorry for the long wait.

@cpojer cpojer closed this as completed Nov 19, 2015
@cpojer
Copy link
Member

cpojer commented Nov 19, 2015

@catalin-enache
Copy link

Thank you so much for Jasmine 2 support !

@quantuminformation
Copy link

@cpojer how do I specify this in the command line? I tried this but I still get jasmine1 being used

  "scripts": {
    "test": "jest -testRunner = 'node_modules/jest-cli/src/testRunners/jasmine/jasmine2.js"
  },

[email protected] test /Users/nikos/PhpstormProjects/JestAjaxTest
jest -testRunner = node_modules/jest-cli/src/testRunners/jasmine/jasmine2.js

Using Jest CLI v0.8.2, jasmine1

@catalin-enache
Copy link

@quantuminformation
I was able to enable Jasmine2 with the following config:

"jest": {
    "testRunner": "<rootDir>/node_modules/jest-cli/src/testRunners/jasmine/jasmine2.js",
    "scriptPreprocessor": "<rootDir>/node_modules/babel-jest",
    "unmockedModulePathPatterns": [
      "<rootDir>/node_modules/react",
      "<rootDir>/node_modules/react-dom",
      "<rootDir>/node_modules/react-addons-test-utils",
      "<rootDir>/node_modules/fbjs"
    ],
    "moduleFileExtensions": ["js", "jsx"],
    "testFileExtensions": ["js", "jsx"]
  },
"scripts": {
    "test": "jest"
  }

https://github.com/catalin-enache/ab_utils/blob/master/package.json

@cpojer
Copy link
Member

cpojer commented Jan 26, 2016

You need --testRunner.

@quantuminformation
Copy link

I couldn't get --testRunner to run. I needed the extended one.

@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 14, 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

No branches or pull requests