--
You received this message because you are subscribed to a topic in the Google Groups "Intravenous" group.
To unsubscribe from this topic, visit https://groups.google.com/d/topic/intravenousjs/LhbRCLlgbPw/unsubscribe.
To unsubscribe from this group and all its topics, send an email to intravenousj...@googlegroups.com.
To post to this group, send email to intrav...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/intravenousjs/3d2c9b49-2646-451e-b3a0-9ca1df986d8d%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.
Agreed. Since my message, my train of thought has tended towards Browserify, which I'm pretty set on now. Still, having a clean way to mock modules on a per-test basis is important, which I'm exploring now.
--
You received this message because you are subscribed to a topic in the Google Groups "Intravenous" group.
To unsubscribe from this topic, visit https://groups.google.com/d/topic/intravenousjs/LhbRCLlgbPw/unsubscribe.
To unsubscribe from this group and all its topics, send an email to intravenousj...@googlegroups.com.
To post to this group, send email to intrav...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/intravenousjs/8f6dad98-8376-4b1c-acb1-8c712c4805f2%40googlegroups.com.
I wrote a modified version of require() based on browserify's which included a mocking mechanism. Then I woke up this morning and realized that it required the module being mocked to be loaded before it could set the mock, and maybe that's a bad thing (what if module loading has side effects?). Seems like Jest has the same trait, but likely provides ways to work around those cases, and maybe those cases are the minority anyway.Interesting, thanks for sharing. I hadn't found Jest yet. It's been surprisingly tricky to track down all the various javascript unit testing/mocking/DI solutions out there.I'm not sure I like being tied to the whole jest stack (jasmine, test runner, etc), but maybe the custom require() could be extracted.
On Wed, May 21, 2014 at 1:09 AM, Roy Jacobs via Intravenous <intravenousjs+noreply-APn2wQevt4KNqcQ080_JAt4z7CUH98fOLUTxG8IO9a@googlegroups.com> wrote:
Agreed. Since my message, my train of thought has tended towards Browserify, which I'm pretty set on now. Still, having a clean way to mock modules on a per-test basis is important, which I'm exploring now.Facebook just released an interesting library that "mocks by default": http://facebook.github.io/jest/Not sure if I like their mocking syntax, it seems awfully verbose, but it could be an interesting starting point for you.
--
You received this message because you are subscribed to a topic in the Google Groups "Intravenous" group.
To unsubscribe from this topic, visit https://groups.google.com/d/topic/intravenousjs/LhbRCLlgbPw/unsubscribe.
To unsubscribe from this group and all its topics, send an email to intravenousjs+unsubscribe@googlegroups.com.