Skip to content

Commit

Permalink
chore: remove install provider
Browse files Browse the repository at this point in the history
  • Loading branch information
Mr.Mao committed Jul 19, 2024
1 parent c766553 commit 2f18e83
Showing 1 changed file with 2 additions and 25 deletions.
27 changes: 2 additions & 25 deletions packages/@vue/__tests__/install.spec.ts
Original file line number Diff line number Diff line change
@@ -1,35 +1,12 @@
import { mount } from '@vue/test-utils'
import { defineComponent, h } from 'vue'
import { Provider, install } from '../src'
import { install } from '../src'
import { context } from '../src/internal'
import Basic from './components/basic.vue'

describe('@overlastic/vue:install', () => {
it('install:provider', () => {
const wrapper = mount(Provider)

expect(context.appContext).not.toBeUndefined()

context.appContext = null
wrapper.unmount()
})
it('install:provider:content', () => {
const Main = defineComponent({
render() {
return h(Provider, {}, {
default: () => 'content',
})
},
})
const wrapper = mount(Main)
expect(wrapper.text()).toBe('content')

wrapper.unmount()
})

it('install:function', () => {
const wrapper = mount(Basic, {
global: { plugins: [install] },
global: { plugins: [install as any] },
})

expect(context.appContext).not.toBeUndefined()
Expand Down

0 comments on commit 2f18e83

Please sign in to comment.