mirror of https://github.com/nocodb/nocodb
Braks
2 years ago
committed by
Pranav C
7 changed files with 2006 additions and 32 deletions
@ -0,0 +1,25 @@ |
|||||||
|
import { mount } from '@vue/test-utils' |
||||||
|
import { expect, test } from 'vitest' |
||||||
|
|
||||||
|
import Sponsors from './Sponsors.vue' |
||||||
|
import { createVuetifyPlugin } from '~/plugins/vuetify' |
||||||
|
import { createI18nPlugin } from '~/plugins/i18n' |
||||||
|
|
||||||
|
test('mount component', async () => { |
||||||
|
expect(Sponsors).toBeTruthy() |
||||||
|
|
||||||
|
const vuetify = createVuetifyPlugin() |
||||||
|
const i18n = await createI18nPlugin() |
||||||
|
|
||||||
|
const wrapper = mount(Sponsors, { |
||||||
|
global: { |
||||||
|
plugins: [vuetify], |
||||||
|
mocks: { |
||||||
|
$t: () => i18n.global.t, |
||||||
|
}, |
||||||
|
}, |
||||||
|
props: { |
||||||
|
nav: true, |
||||||
|
}, |
||||||
|
}) |
||||||
|
}) |
File diff suppressed because it is too large
Load Diff
@ -0,0 +1,37 @@ |
|||||||
|
/// <reference types="vitest" />
|
||||||
|
|
||||||
|
import path from 'path' |
||||||
|
import vueI18n from '@intlify/vite-plugin-vue-i18n' |
||||||
|
import Icons from 'unplugin-icons/vite' |
||||||
|
import { defineConfig } from 'vite' |
||||||
|
import Vue from '@vitejs/plugin-vue' |
||||||
|
|
||||||
|
export default defineConfig({ |
||||||
|
plugins: [ |
||||||
|
Vue(), |
||||||
|
vueI18n({ |
||||||
|
include: path.resolve(__dirname, '../lang'), |
||||||
|
}), |
||||||
|
Icons({ |
||||||
|
autoInstall: true, |
||||||
|
compiler: 'vue3', |
||||||
|
}), |
||||||
|
], |
||||||
|
test: { |
||||||
|
setupFiles: path.resolve(__dirname, './vuetify.config.js'), |
||||||
|
deps: { |
||||||
|
inline: ['vuetify'], |
||||||
|
}, |
||||||
|
globals: true, |
||||||
|
environment: 'happy-dom', |
||||||
|
}, |
||||||
|
|
||||||
|
resolve: { |
||||||
|
alias: { |
||||||
|
'@': path.resolve(__dirname, '../'), |
||||||
|
'~': path.resolve(__dirname, '../'), |
||||||
|
'#app': path.resolve(__dirname, '../node_modules/nuxt/dist/app'), |
||||||
|
'#imports': path.resolve(__dirname, '../.nuxt/imports'), |
||||||
|
}, |
||||||
|
}, |
||||||
|
}) |
Loading…
Reference in new issue