At the moment named constant exports are just ignored:
export const foo = 'bar';
No rewire stubs are added for this export, so if you try import rewire$foo in your test, you get import is not defined error that is unexpected for plugin consumers.
The PR enables rewiring for named constant export.
In
export const foo = 'bar';
Out
const foo = 'bar';
var _foo = foo;
export { _foo as foo };
var _foo2 = _foo;
export function rewire$foo($stub) {
_foo = $stub;
}
export function restore() {
_foo = _foo2;
}
At the moment named constant exports are just ignored:
No rewire stubs are added for this export, so if you try import
rewire$foo
in your test, you getimport is not defined
error that is unexpected for plugin consumers.The PR enables rewiring for named constant export.
In
Out