We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent a5acb4a commit e1c5980Copy full SHA for e1c5980
packages/runtime-vapor/__tests__/component.spec.ts
@@ -281,4 +281,26 @@ describe('component', () => {
281
expect(host.innerHTML).toBe('')
282
expect(i.scope.effects.length).toBe(0)
283
})
284
+
285
+ it('warn if functional vapor component not return a block', () => {
286
+ define(() => {
287
+ return () => {}
288
+ }).render()
289
290
+ expect(
291
+ 'Functional vapor component must return a block directly',
292
+ ).toHaveBeenWarned()
293
+ })
294
295
+ it('warn if setup return a function and no render function', () => {
296
+ define({
297
+ setup() {
298
+ return () => []
299
+ },
300
301
302
303
+ 'Vapor component setup() returned non-block value, and has no render function',
304
305
306
0 commit comments