jhnns / rewire

Easy monkey-patching for node.js unit tests
MIT License
3.08k stars 128 forks source link

Doesn't work with coffeescript package #126

Closed odedniv closed 6 years ago

odedniv commented 6 years ago

This package seems to only work with coffee-script (deprecated) package, and not the new coffeescript package.

I get this until I include coffee-script in my devDependencies:

TypeError: Cannot read property 'compile' of undefined
 at Object.coffeeExtension (node_modules/rewire/lib/moduleEnv.js:95:21)
 at Module.load (node_modules/coffeescript/lib/coffeescript/register.js:53:36)
 at Object.load (node_modules/rewire/lib/moduleEnv.js:23:18)
 at internalRewire (node_modules/rewire/lib/rewire.js:50:15)
 at rewire (node_modules/rewire/lib/index.js:11:12)

Any ideas?