diff --git a/tests/get.spec.ts b/tests/get.spec.ts index a9ac12285..291e3037d 100644 --- a/tests/get.spec.ts +++ b/tests/get.spec.ts @@ -14,6 +14,22 @@ describe('get', () => { expect(wrapper.get('#my-span')).not.toBeNull() }) + test('returns the element if it is a root element inside Suspense', () => { + const Async = defineComponent({ + // works if there is a root element + // template: '

Hello

There
' + // otherwise does not find the element + template: '

Hello

There' + }) + const Component = defineComponent({ + components: { Async }, + template: '' + }) + + const wrapper = mount(Component) + expect(wrapper.get('#my-span')).not.toBeNull() + }) + test('throws if it does not exist', () => { const Component = defineComponent({ render() {