Skip to content
This repository has been archived by the owner on Jul 29, 2024. It is now read-only.

Jasmine 2.0 is out, explore updating to that #362

Closed
juliemr opened this issue Dec 18, 2013 · 30 comments
Closed

Jasmine 2.0 is out, explore updating to that #362

juliemr opened this issue Dec 18, 2013 · 30 comments

Comments

@juliemr
Copy link
Member

juliemr commented Dec 18, 2013

No description provided.

@juliemr
Copy link
Member Author

juliemr commented Dec 26, 2013

This should be in sync with Karma, probably. See karma-runner/karma-jasmine#15

@juliemr
Copy link
Member Author

juliemr commented Dec 27, 2013

Got minijasminenode working with 2.0: https://github.com/juliemr/minijasminenode/tree/jasmine2

The only regression is that there is now no way to specify a timeout for only one spec :(

Raised an issue jasmine/jasmine#483 to see if we can perhaps find a way around this.

@juliemr
Copy link
Member Author

juliemr commented Mar 5, 2014

See Karma's update for reference: karma-runner/karma-jasmine@4e0b48a

And fixing iit/ddescribe: karma-runner/karma-jasmine@07ddb36

@geppy
Copy link

geppy commented Apr 4, 2014

What's remaining to support updating Jasmine to 2.0? I'd be interested in working on this one.

@geppy
Copy link

geppy commented Apr 4, 2014

Ah, I see #483, I'll look into it.

@juliemr
Copy link
Member Author

juliemr commented Apr 4, 2014

@BrianGeppert at this point I'm mostly waiting on Jasmine to update itself. They've said they're going to be adding an npm module, so to reduce churn later I was just waiting for that.

@geppy
Copy link

geppy commented Apr 4, 2014

Makes sense. Thanks!

@hyzhak
Copy link

hyzhak commented May 20, 2014

Is there any changes? 👍 for Jasmine 2.0.

@juliemr juliemr self-assigned this Jun 9, 2014
@juliemr
Copy link
Member Author

juliemr commented Jun 17, 2014

Status update:

We've decoupled more of the protractor versus Jasmine system, so now there are three npm packages at play: protractor, jasminewd, and minijasminenode.

I've released minijasminenode2, which is an adapter for Jasmine 2.0 to node.js. It's available for download (npm install minijasminenode2).

Getting JasmineWD to work with minijasminenode2 has proved difficult. We're losing some functionality, and there's no user-visible benefits. The full discussion is here: angular/jasminewd#5. So, for the moment, we're going to hold off on updating JasmineWD or Protractor to use Jasmine 2.0. What we'll probably do is eventually make this a separate framework option, so folks happy with the status quo can continue without breaking changes and you can use --framework jasmine2 if you care about a particular feature from Jasmine 2.0.

@juliemr juliemr added this to the Icebox milestone Jun 18, 2014
@panuhorsmalahti
Copy link

The end user benefit from updating to Jasmine 2.0 is significant, as Jasmine 2.0 makes async tests sane. The 1.x branch has a pretty annoying syntax for that.

@mgol
Copy link
Member

mgol commented Jun 27, 2014

@panuhorsmalahti

The end user benefit from updating to Jasmine 2.0 is significant, as Jasmine 2.0 makes async tests sane. The 1.x branch has a pretty annoying syntax for that.

Yeah, that's true. I couldn't believe how terrible async testing was in 1.x with all this manual waiting etc.

@AGresvig
Copy link

Amen!

Sent from my Sony Xperia™ smartphone

---- Michał Gołębiowski wrote ----

@panuhorsmalahti

The end user benefit from updating to Jasmine 2.0 is significant, as Jasmine 2.0 makes async tests sane. The 1.x branch has a pretty annoying syntax for that.

Yeah, that's true. I couldn't believe how terrible async testing was in 1.x with all this manual waiting etc.


Reply to this email directly or view it on GitHub.

@mgol
Copy link
Member

mgol commented Jun 27, 2014

...that said, Protractor has its own async handling so that may be not important here.

It's nice to be able to use the same Jasmine version in unit tests & e2e ones to not require context switch, though.

@PaddyMann
Copy link

Any progress on this or has it been parked?

I'd love to see Jasmine 2's support for pending tests (in Jasmine 1.3 you cannot mark as a test as xit, but then it doesn't get returned in the results, whereas in Jasmine 2 it will be displayed in the results as pending).

This may sound trivial, but given our workflow it would save a lot of time.

Any suggestions of alternative ways to achieve the same effect would be gratefully received (an easy way to view pending tests without causing the test to fail and so polluting the terminal when you're trying to debug).

@smahalingam
Copy link

Is there a way to generate report using jasmine 2.0 ?

@jbnicolai
Copy link

+1 on adding 2.0 support.

Is this still actively being looked at? Otherwise I might give it a shot.

@juliemr
Copy link
Member Author

juliemr commented Aug 27, 2014

Hi all,

Jasmine 2.0 is not on my todo soon (tm) list at the moment. (e.g., I'm not going to look at it in the next month). The issues at angular/jasminewd#5 are still relevant - if anyone wants to update that PR to address the missing features I'd take a look at it.

@gamebox
Copy link

gamebox commented Dec 19, 2014

Just opining that if this project is looking at upgrading Jasmine support - it should go straight to 2.1. Support for beforeAll and afterAll without additional dependencies would be great

@juliemr
Copy link
Member Author

juliemr commented Dec 19, 2014

@gamebox Agreed, we'll just go to the latest.

The current plan is to support Jasmine 2.something as a different framework option, since there will be some loss of features. @hankduan

@juliemr juliemr assigned hankduan and unassigned juliemr Dec 19, 2014
@mhaligowski
Copy link

is there any progress with that? it would be great to have even jasmine 2.1, which has beforeAll().

@xdissent
Copy link

@mhaligowski I have a jasmine 2.1.3 branch at https://github.com/xdissent/protractor/tree/jasmine-2 that works great but it depends on forks of jasminewd and minijasminenode2 (juliemr/minijasminenode#27, https://github.com/xdissent/jasminewd/tree/jasmine-2). It also alters the existing framework rather than adding an additional one as @juliemr mentioned. But if you just want jasmine 2 now (like me) it gets the job done. Anyway, jasminewd and minijasminenode2 must be updated before protractor can make a move.

@hankduan
Copy link
Contributor

hankduan commented Jan 5, 2015

jasmine2 is added into protractor via 1e60a95

As mentioned in #1675, there are two caveats:

@hankduan hankduan closed this as completed Jan 5, 2015
@nishakchaudhari
Copy link

So timeout for individual test has been fixed? I tried running my test with jasmine2. It gives me timeout error.

@hankduan
Copy link
Contributor

I'm not sure what is your question. Jasmine2 doesn't make timeouts all magically disappear. If your test doesn't finish without a specified time, or your app isn't load, etc, your test will still time out. See https://github.com/angular/protractor/blob/master/docs/timeouts.md

@nishakchaudhari
Copy link

So I want to know how to setup timeout for individual test with jasmine2.
Before I was doing it in this way : it(description, testFn, timeout_in_millis). And it worked when my jasmine version was <2.
I upgraded jasmine version and now I get following error:
Error: Timeout - Async callback was not invoked within timeout specified by jasmine.DEFAULT_TIMEOUT_INTERVAL

@vsathyak
Copy link

vsathyak commented Jul 8, 2015

@nishakchaudhari : I started using protractor and jasmine 2 and I am also facing the same issue. Any work around for this??

@nishakchaudhari
Copy link

upgrade jasmine version to 2.3.1 . jasmine 2.3.1 supports timeout for individual test .

@srajwadi
Copy link

How to update jasmine version. I am currently using 1.3.1 and protractor version is 2.1.0. Can anyone say that how to update jasmine version. I am new to this.
Thanks..

@hankduan
Copy link
Contributor

@mocsharp
Copy link

how can I have beforeAll wait for async calls in Jasmine 2.0? Thanks.

@hankduan hankduan removed their assignment Nov 4, 2015
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

No branches or pull requests