// 1. the render function may already exist, returned by `setup`
// 2. otherwise try to use the `Component.render`
// 3. if the component doesn't have a render function,
- // set `instance.render` to NOOP so that it can inherit the render function from mixins/extend
+ // set `instance.render` to NOOP so that it can inherit the render
+ // function from mixins/extend
instance.render = (instance.render ||
Component.render ||
NOOP) as InternalRenderFunction
test('effect onInvalidate does not error', async () => {
const noop = () => {}
const app = createApp({
- setup: () => watchEffect(onInvalidate => onInvalidate(noop)),
- render: noop,
+ setup: () => {
+ watchEffect(onInvalidate => onInvalidate(noop))
+ },
+ render: noop
})
expect(await render(app)).toBe('<!---->')
})