mirror of
https://github.com/ecomfe/vue-echarts.git
synced 2025-10-27 19:13:59 +08:00
test: increase coverage and add codecov integration
This commit is contained in:
14
tests/setup.ts
Normal file
14
tests/setup.ts
Normal file
@ -0,0 +1,14 @@
|
||||
import { afterEach, vi } from "vitest";
|
||||
import { cleanup } from "vitest-browser-vue/pure";
|
||||
|
||||
import { createEChartsModule } from "./helpers/mock";
|
||||
import { resetDocumentBody } from "./helpers/dom";
|
||||
|
||||
// Mock echarts/core globally for browser tests
|
||||
vi.mock("echarts/core", () => createEChartsModule());
|
||||
|
||||
// Centralized cleanup for all browser tests
|
||||
afterEach(() => {
|
||||
cleanup();
|
||||
resetDocumentBody();
|
||||
});
|
||||
Reference in New Issue
Block a user