Package Exports
- esmock
This package does not declare an exports field, so the exports above have been automatically detected and optimized by JSPM instead. If any package subpath is missing, it is recommended to post an issue to the original package (esmock) to support the "exports" field. If that is not possible, create a JSPM override to customize the exports field for this package.
Readme
esmock
(c)Bumblehead
import test from 'ava';
import esmock from 'esmock';
test('should mock module and local file at the same time', async t => {
const main = await esmock('./local/main.js', {
'astringifierpackage' : o => JSON.stringify(o),
'./local/util.js' : {
exportedFunction : () => 'foobar'
}
});
t.is(main(), 'foobar, ' + JSON.stringify({ test: 'object' }));
});