2
0

fixtures.test.ts 438 B

12345678910111213
  1. import * as CompilerVapor from '../src'
  2. import { parse, compileScript } from '@vue/compiler-sfc'
  3. import source from './fixtures/counter.vue?raw'
  4. test('fixtures', async () => {
  5. const { descriptor } = parse(source, { compiler: CompilerVapor })
  6. const script = compileScript(descriptor, {
  7. id: 'counter.vue',
  8. inlineTemplate: true,
  9. templateOptions: { compiler: CompilerVapor },
  10. })
  11. expect(script.content).matchSnapshot()
  12. })