swc/node-swc/__tests__/transform/issue_1581_test.js
강동윤 4db24fb7f6
fix(swc): Fix various bugs (#1588)
swc_ecma_transforms_module:
 - Change the order of functions exported as default. (#1568)
 - Handle mixed imports correctly. (#1525)

swc:
 - Ensure that #1581 is fixed. (#1581)
2021-04-18 20:58:30 +00:00

13 lines
455 B
JavaScript

const path = require('path');
const swc = require('../../..');
it('should emit source maps as inline if requested', () => {
const filename = path.resolve(
__dirname + "/../../tests/issue-1581/foo.ts"
);
// We only check if it's not empty sourcemap.
expect(swc.transformFileSync(filename).code.trim()).not.toContain(
`eyJ2ZXJzaW9uIjozLCJzb3VyY2VzIjpbXSwibmFtZXMiOltdLCJtYXBwaW5ncyI6IiIsImZpbGUiOiJzdGRvdXQifQ==`
);
});