Skip to content

Commit 7cf143d

Browse files
committed
chore: fix test
1 parent b4b8215 commit 7cf143d

File tree

2 files changed

+6
-3
lines changed

2 files changed

+6
-3
lines changed

packages/runtime-core/src/component.ts

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -673,7 +673,8 @@ function finishComponentSetup(
673673
// 1. the render function may already exist, returned by `setup`
674674
// 2. otherwise try to use the `Component.render`
675675
// 3. if the component doesn't have a render function,
676-
// set `instance.render` to NOOP so that it can inherit the render function from mixins/extend
676+
// set `instance.render` to NOOP so that it can inherit the render
677+
// function from mixins/extend
677678
instance.render = (instance.render ||
678679
Component.render ||
679680
NOOP) as InternalRenderFunction

packages/server-renderer/__tests__/render.spec.ts

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -781,8 +781,10 @@ function testRender(type: string, render: typeof renderToString) {
781781
test('effect onInvalidate does not error', async () => {
782782
const noop = () => {}
783783
const app = createApp({
784-
setup: () => watchEffect(onInvalidate => onInvalidate(noop)),
785-
render: noop,
784+
setup: () => {
785+
watchEffect(onInvalidate => onInvalidate(noop))
786+
},
787+
render: noop
786788
})
787789
expect(await render(app)).toBe('<!---->')
788790
})

0 commit comments

Comments
 (0)