const adapter = require('../src/index'); const sfc = require('./make-sfc'); const template = `
{{name}}
`; const script = ` export default { props: { name: String } }; `; const style = ` .widget { color: red; } `; describe('jscodeshift mode', () => { describe('transforming js file', () => { test('passes js content as fileInfo.source', () => { let js = null; const adapted = adapter(function transform(fileInfo, api, options) { js = fileInfo.source; }); adapted({ source: 'const b = 400;', path: 'util.js' }, {}, {}); expect(js).toBe('const b = 400;'); }); }); describe('transforming vue component', () => { test('passes component