Skip to content

Commit

Permalink
test: remove unnecessary code in apiCreateApp tests (#10388)
Browse files Browse the repository at this point in the history
  • Loading branch information
OnlyWick authored Feb 25, 2024
1 parent eadce5b commit ede2e3f
Showing 1 changed file with 5 additions and 10 deletions.
15 changes: 5 additions & 10 deletions packages/runtime-core/__tests__/apiCreateApp.spec.ts
Original file line number Diff line number Diff line change
Expand Up @@ -143,10 +143,10 @@ describe('api: createApp', () => {
},
setup() {
// resolve in setup
const FooBar = resolveComponent('foo-bar') as any
const FooBar = resolveComponent('foo-bar')
return () => {
// resolve in render
const BarBaz = resolveComponent('bar-baz') as any
const BarBaz = resolveComponent('bar-baz')
return h('div', [h(FooBar), h(BarBaz)])
}
},
Expand Down Expand Up @@ -182,10 +182,10 @@ describe('api: createApp', () => {
},
setup() {
// resolve in setup
const FooBar = resolveDirective('foo-bar')!
const FooBar = resolveDirective('foo-bar')
return () => {
// resolve in render
const BarBaz = resolveDirective('bar-baz')!
const BarBaz = resolveDirective('bar-baz')
return withDirectives(h('div'), [[FooBar], [BarBaz]])
}
},
Expand Down Expand Up @@ -350,7 +350,7 @@ describe('api: createApp', () => {

const handler = vi.fn((err, instance, info) => {
expect(err).toBe(error)
expect((instance as any).count).toBe(count.value)
expect(instance.count).toBe(count.value)
expect(info).toBe(`render function`)
})

Expand Down Expand Up @@ -450,11 +450,6 @@ describe('api: createApp', () => {
}

const app = createApp(Root)
Object.defineProperty(app.config, 'isNativeTag', {
value: isNativeTag,
writable: false,
})

app.mount(nodeOps.createElement('div'))
expect(
`Do not use built-in directive ids as custom directive id: bind`,
Expand Down

0 comments on commit ede2e3f

Please sign in to comment.