Closed robrich closed 10 years ago
Very impressive discovery; excited to have this. Lots of nits, but good stuff overall.
Changes made, Travis went green.
What I really like about using the discovered list to test them all is it's also future-proof. If they include another native module or deprecate one, the test still works. I grant it's not as discoverable, thus the excessive comments, but I do think it's a safer design.
Yeah, let's use the discovered list, but with a static checked-in fixture instead of writing a bunch of temp files.
I rebooted, and suddenly process.moduleLoadList
was nearly empty. Switched to monkey patching (pillaged from https://gist.github.com/Benvie/1841241) to get NativeModule, which works like a charm. Also note that when dynamic test fails, it's much easier to know why, so I included both.
Let me be clearer: I don't want any tests in this repo that create temporary files on the disk :)
Thank you for clarifying.
Will this be re-pulled at some point? I'm running into an issue with a module loading winston-syslog, which has native code to it, on which the sandbox loaders pukes.
Yes, I've been meaning to revive this and just remove the temp-file creating tests before merging. Thanks for chiming in; that helps me prioritize.
Use proxyquire. It has no such issues.
domenic: Great. :) robrich: No. :)
... instead of using a hard-coded list