UNPKG

saepequia

Version:

A simple, maximally extensible, dependency minimized framework for building modern Ethereum dApps

16 lines (13 loc) 390 B
import { transformAsync } from '@babel/core'; it('replaces dynamic imports with a noop', async () => { const { code } = await transformAsync( `import('./foo').then(foo => foo.init())`, { plugins: [require.resolve('../babel/dynamic-import-noop')], filename: 'source.js', configFile: false, babelrc: false, } ); expect(code).toMatchSnapshot(); });