Closed TheLudd closed 10 years ago
Forgive me, as there are probably 6 permutations which this issue could be describing. So that I'm clear:
Is that true?
That is true.
Ah, then we definitely don't support that yet. I'm currently scheming to do a complete rewrite of jasmine-given (very soon) and as a result I'm not sure what the best course of action is at this time. If you can muster up a pull request that's minimally invasive and solves your issue, I'll merge it in, cut a release, and then probably pester you when it comes time to replace the current code with the new implementation to make sure it still works (and has a test).
My main reason for wanting to use requirejs was to be alble to mock my dependencies easy. I have however found other ways to do that using nodes reqular require. So for now I will go with this solution.
Ah, I strongly recommend you try sandboxed-module for mocking dependencies when you're testing node code. Much cleaner as it doesn't require any atypical setup of your production code.
On Mon, Jan 6, 2014 at 12:38 PM, Ludwig Magnusson notifications@github.comwrote:
My main reason for wanting to use requirejs was to be alble to mock my dependencies easy. I have however found other ways to do that using nodes reqular require. So for now I will go with this solution.
— Reply to this email directly or view it on GitHubhttps://github.com/searls/jasmine-given/issues/21#issuecomment-31668408 .
@searls A side note on the re-implementing. I have been using jasmine-given for ~2 weeks now and it seems awesome. Id be willing to help to contribute in any way if possible.
Appreciated! Keep an eye on my epic-rewrite branch. I'll probably open a PR against master once I get started (I need to finish wrapping up a bunch of integration tests first)
On Sat, Jan 11, 2014 at 11:14 AM, Ludwig Magnusson <notifications@github.com
wrote:
@searls https://github.com/searls A side note on the re-implementing. I have been using jasmine-given for ~2 weeks now and it seems awesome. Id be willing to help to contribute in any way if possible.
— Reply to this email directly or view it on GitHubhttps://github.com/searls/jasmine-given/issues/21#issuecomment-32099873 .
Following the instructions in the readme file for use with node js I have managed to make my tests run with jasmine-given. However when I try to setup a nodejs project using requirejs I always get the error
"Given is not defined"
when running the tests. I have tried importing jasmine-given both from my main requirejs file and in my spec. And I have verified that the code in thejasmine-given.coffe
file is run.Has use with nodejs and requirejs combined been tested and is it supported?