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";
|
||||
// https://vitejs.dev/config/
|
||||
export default ({ command, mode }: ConfigEnv): UserConfig => {
|
||||
const { VITE_SW_PROXY_TARGET } = loadEnv(mode, process.cwd());
|
||||
return {
|
||||
plugins: [
|
||||
vue(),
|
||||
@ -36,11 +37,11 @@ export default ({ command, mode }: ConfigEnv): UserConfig => {
|
||||
AutoImport({
|
||||
imports: ["vue"],
|
||||
resolvers: [ElementPlusResolver()],
|
||||
dts: "./src/types/auto-imports.d.ts",
|
||||
dts: path.resolve(__dirname, "./src/types/auto-imports.d.ts"),
|
||||
}),
|
||||
Components({
|
||||
resolvers: [ElementPlusResolver()],
|
||||
dts: "./src/types/components.d.ts",
|
||||
dts: path.resolve(__dirname, "./src/types/components.d.ts"),
|
||||
}),
|
||||
],
|
||||
resolve: {
|
||||
@ -56,9 +57,7 @@ export default ({ command, mode }: ConfigEnv): UserConfig => {
|
||||
port: 3000,
|
||||
proxy: {
|
||||
"/graphql": {
|
||||
target: `${
|
||||
loadEnv(mode, process.cwd()).VITE_SW_PROXY_TARGET || "http://127.0.0.1:12800"
|
||||
}`,
|
||||
target: `${VITE_SW_PROXY_TARGET || "http://127.0.0.1:12800"}`,
|
||||
changeOrigin: true,
|
||||
},
|
||||
},
|
||||
|
Loading…
Reference in New Issue
Block a user