mirror of
https://github.com/nuxt/nuxt.git
synced 2024-11-12 17:13:56 +00:00
31 lines
680 B
TypeScript
31 lines
680 B
TypeScript
import * as CompositionApi from '@vue/composition-api'
|
|
import { expect, describe, it } from 'vitest'
|
|
|
|
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)
|
|
})
|
|
}
|
|
})
|