mhevery / jasmine-node

Integration of Jasmine Spec framework with Node.js
MIT License
1.52k stars 291 forks source link

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

Open developerlaoz opened 9 years ago

developerlaoz commented 9 years ago

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?

jcwatson11 commented 9 years ago

+1 Answering this question would be really helpful.

marcin-wosinek commented 9 years ago

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

aleclarson commented 9 years ago

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!

TGOlson commented 9 years ago

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