mirror of
https://github.com/apache/skywalking-booster-ui.git
synced 2025-05-13 16:27:33 +00:00
build: fix test config
This commit is contained in:
parent
09d0d0049b
commit
30317aabc0
17
src/components/__tests__/HelloWorld.spec.ts
Normal file
17
src/components/__tests__/HelloWorld.spec.ts
Normal file
@ -0,0 +1,17 @@
|
|||||||
|
import { describe, it, expect } from "vitest";
|
||||||
|
|
||||||
|
// import { mount } from '@vue/test-utils'
|
||||||
|
// import HelloWorld from '../HelloWorld.vue'
|
||||||
|
|
||||||
|
// describe('HelloWorld', () => {
|
||||||
|
// it('renders properly', () => {
|
||||||
|
// const wrapper = mount(HelloWorld, { props: { msg: 'Hello Vitest' } })
|
||||||
|
// expect(wrapper.text()).toContain('Hello Vitest')
|
||||||
|
// })
|
||||||
|
// })
|
||||||
|
describe("My First Test", () => {
|
||||||
|
it("renders props.msg when passed", () => {
|
||||||
|
const msg = "new message";
|
||||||
|
console.log(msg);
|
||||||
|
});
|
||||||
|
});
|
@ -28,6 +28,7 @@ import path from "path";
|
|||||||
const OUTPUT_DIR = "dist";
|
const OUTPUT_DIR = "dist";
|
||||||
// https://vitejs.dev/config/
|
// https://vitejs.dev/config/
|
||||||
export default ({ command, mode }: ConfigEnv): UserConfig => {
|
export default ({ command, mode }: ConfigEnv): UserConfig => {
|
||||||
|
const { VITE_SW_PROXY_TARGET } = loadEnv(mode, process.cwd());
|
||||||
return {
|
return {
|
||||||
plugins: [
|
plugins: [
|
||||||
vue(),
|
vue(),
|
||||||
@ -36,11 +37,11 @@ export default ({ command, mode }: ConfigEnv): UserConfig => {
|
|||||||
AutoImport({
|
AutoImport({
|
||||||
imports: ["vue"],
|
imports: ["vue"],
|
||||||
resolvers: [ElementPlusResolver()],
|
resolvers: [ElementPlusResolver()],
|
||||||
dts: "./src/types/auto-imports.d.ts",
|
dts: path.resolve(__dirname, "./src/types/auto-imports.d.ts"),
|
||||||
}),
|
}),
|
||||||
Components({
|
Components({
|
||||||
resolvers: [ElementPlusResolver()],
|
resolvers: [ElementPlusResolver()],
|
||||||
dts: "./src/types/components.d.ts",
|
dts: path.resolve(__dirname, "./src/types/components.d.ts"),
|
||||||
}),
|
}),
|
||||||
],
|
],
|
||||||
resolve: {
|
resolve: {
|
||||||
@ -56,9 +57,7 @@ export default ({ command, mode }: ConfigEnv): UserConfig => {
|
|||||||
port: 3000,
|
port: 3000,
|
||||||
proxy: {
|
proxy: {
|
||||||
"/graphql": {
|
"/graphql": {
|
||||||
target: `${
|
target: `${VITE_SW_PROXY_TARGET || "http://127.0.0.1:12800"}`,
|
||||||
loadEnv(mode, process.cwd()).VITE_SW_PROXY_TARGET || "http://127.0.0.1:12800"
|
|
||||||
}`,
|
|
||||||
changeOrigin: true,
|
changeOrigin: true,
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
|
Loading…
Reference in New Issue
Block a user