Closed DanielZlotin closed 8 years ago
Without your source code we can't look
@bendrucker What source do you need? this is my usage:
const rootPath = require('app-root-path');
const proxyquireLib = require('proxyquire');
...
test = {
proxyquire: (path, imports) => {
return proxyquireLib.noCallThru().noPreserveCache()(rootPath.resolve(path), imports);
}
...
const uut = test.proxyquire('src/reducers/session/actions', {
'my-module': {}, ...
});
...
inside src/reducers/session/actions
the first line is import _ from 'lodash';
before the update to 1.7.5 everything worked.
now it seems babel is not working with modules imported with proxyquire.
now it seems babel is not working with modules imported with proxyquire
As of 1.7.5 the noPreserveCache
behavior deletes additional modules from the cache to resolve a bug: #102. We don't formally support transpilation right now even if it worked before. In order to get it working again and supported, we'll need a failing test and some investigation. Since I don't use Babel this is a relatively low priority for me. If you want to work on a PR I can review it, otherwise I'll come back to this and address it sometime.
For right now, just pin your version to 1.7.4
1.7.4 everything worked. broken test suite as a result from the update: (1.7.5 and 1.7.6 same issue)