jasmine-node icon indicating copy to clipboard operation
jasmine-node copied to clipboard

How to use jasmine 2.1.*~ for [beforeAll]

Open developerlaoz opened this issue 10 years ago • 4 comments
trafficstars

Because the jasmine-node 2.0.0 beta use jasmine 2.0 for the test case, but the jasmine 2.0 does not support the beforeAll.

So how can I use jasmine 2.1.* to support my test code?

developerlaoz avatar Jan 16 '15 07:01 developerlaoz

+1 Answering this question would be really helpful.

jcwatson11 avatar Feb 19 '15 15:02 jcwatson11

I guess this is the solution: http://jasmine.github.io/2.2/node.html

marcin-wosinek avatar Feb 28 '15 14:02 marcin-wosinek

I forked this repo and updated it to use jasmine-core instead of embedding Jasmine as part of this package. So you should (in theory) be able to use any version of Jasmine you wish. Though it's possible some versions don't work (I've only tested Jasmine 2.2.1).

Here's the fork.

Let me know what you think. Does it suck? Then send me a pull request or make an issue. Thanks!

aleclarson avatar Mar 30 '15 00:03 aleclarson

@marcin-wosinek +1 - good find. Problem is there aren't the nice auto-test options that jasmine-node provides.

jasmine-node should really provide an interface to use a local version of jasmine, instead of have a jasmine version baked into it. Random example, but the atom eslint plugin does a great job at this. Local npm installed version is used, if available, otherwise it falls back to a pre-bundled version.

TGOlson avatar May 12 '15 19:05 TGOlson