mirror of
https://github.com/nuxt/nuxt.git
synced 2024-11-12 09:03:53 +00:00
31 lines
664 B
TypeScript
31 lines
664 B
TypeScript
|
import * as CompositionApi from '@vue/composition-api'
|
||
|
import { expect } from 'chai'
|
||
|
|
||
|
import { Nuxt3AutoImports } from '../../nuxt3/src/auto-imports/imports'
|
||
|
|
||
|
const excludedVueHelpers = [
|
||
|
'EffectScope',
|
||
|
'createApp',
|
||
|
'createRef',
|
||
|
'default',
|
||
|
'del',
|
||
|
'isRaw',
|
||
|
'set',
|
||
|
'useCSSModule',
|
||
|
'version',
|
||
|
'warn',
|
||
|
'watchPostEffect',
|
||
|
'watchSyncEffect'
|
||
|
]
|
||
|
|
||
|
describe('auto-imports:vue', () => {
|
||
|
for (const name of Object.keys(CompositionApi)) {
|
||
|
if (excludedVueHelpers.includes(name)) {
|
||
|
continue
|
||
|
}
|
||
|
it(`should register ${name} globally`, () => {
|
||
|
expect(Nuxt3AutoImports.find(a => a.from === 'vue').names).to.include(name)
|
||
|
})
|
||
|
}
|
||
|
})
|