import { parse } from '../src' import { mockWarn } from '@vue/runtime-test' describe('compiler:sfc', () => { mockWarn() describe('error', () => { test('should only allow single template element', () => { parse(``) expect( `Single file component can contain only one template element` ).toHaveBeenWarned() }) test('should only allow single script element', () => { parse(``) expect( `Single file component can contain only one script element` ).toHaveBeenWarned() }) }) })