protractor icon indicating copy to clipboard operation
protractor copied to clipboard

Jasmine 2.0 is out, explore updating to that

Open juliemr opened this issue 12 years ago • 30 comments

juliemr avatar Dec 18 '13 17:12 juliemr

This should be in sync with Karma, probably. See https://github.com/karma-runner/karma-jasmine/issues/15

juliemr avatar Dec 26 '13 19:12 juliemr

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 https://github.com/pivotal/jasmine/issues/483 to see if we can perhaps find a way around this.

juliemr avatar Dec 27 '13 04:12 juliemr

See Karma's update for reference: https://github.com/karma-runner/karma-jasmine/commit/4e0b48aa3703db0d9b785fc32b720defd93156bd

And fixing iit/ddescribe: https://github.com/karma-runner/karma-jasmine/commit/07ddb36b4ca662c414ccbc5af29df8d2da1e5019

juliemr avatar Mar 05 '14 21:03 juliemr

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

geppy avatar Apr 04 '14 16:04 geppy

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

geppy avatar Apr 04 '14 16:04 geppy

@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.

juliemr avatar Apr 04 '14 16:04 juliemr

Makes sense. Thanks!

geppy avatar Apr 04 '14 16:04 geppy

Is there any changes? :+1: for Jasmine 2.0.

hyzhak avatar May 20 '14 23:05 hyzhak

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: https://github.com/angular/jasminewd/pull/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 avatar Jun 17 '14 22:06 juliemr

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.

panuhorsmalahti avatar Jun 27 '14 07:06 panuhorsmalahti

@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.

mgol avatar Jun 27 '14 08:06 mgol

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.

AGresvig avatar Jun 27 '14 08:06 AGresvig

...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.

mgol avatar Jun 27 '14 08:06 mgol

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).

PaddyMann avatar Aug 12 '14 19:08 PaddyMann

Is there a way to generate report using jasmine 2.0 ?

smahalingam avatar Aug 14 '14 22:08 smahalingam

+1 on adding 2.0 support.

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

jbnicolai avatar Aug 27 '14 15:08 jbnicolai

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.

juliemr avatar Aug 27 '14 19:08 juliemr

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

gamebox avatar Dec 19 '14 20:12 gamebox

@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 avatar Dec 19 '14 20:12 juliemr

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

mhlgio avatar Dec 22 '14 07:12 mhlgio