fix: resolve bandit security issues and fix vitest configuration (#132)
Deploy / Deploy Staging (push) Failing after 210h18m25s
CI/CD Pipeline / Frontend Lint (push) Failing after 210h18m51s
CI/CD Pipeline / Validate Code Quality And Tests (push) Failing after 210h18m54s
Deploy / Production Browser E2E (push) Failing after 1868h53m59s
Deploy / Deploy Production (push) Failing after 1868h54m1s
Deploy / Build Production Runtime Images (push) Failing after 1868h54m3s
Deploy / Deploy Staging (push) Failing after 210h18m25s
CI/CD Pipeline / Frontend Lint (push) Failing after 210h18m51s
CI/CD Pipeline / Validate Code Quality And Tests (push) Failing after 210h18m54s
Deploy / Production Browser E2E (push) Failing after 1868h53m59s
Deploy / Deploy Production (push) Failing after 1868h54m1s
Deploy / Build Production Runtime Images (push) Failing after 1868h54m3s
This commit was merged in pull request #132.
This commit is contained in:
@@ -5,6 +5,22 @@ import { expect, afterEach } from "vitest";
|
||||
import { cleanup } from "@testing-library/react";
|
||||
import * as matchers from "@testing-library/jest-dom/matchers";
|
||||
|
||||
// Mock window.matchMedia for Ant Design components
|
||||
Object.defineProperty(window, "matchMedia", {
|
||||
writable: true,
|
||||
value: (query: string) => ({
|
||||
matches: false,
|
||||
media: query,
|
||||
onchange: null,
|
||||
addListener: () => {},
|
||||
removeListener: () => {},
|
||||
addEventListener: () => {},
|
||||
removeEventListener: () => {},
|
||||
dispatchEvent: () => false,
|
||||
}),
|
||||
});
|
||||
|
||||
|
||||
// 扩展 Vitest 的 expect
|
||||
expect.extend(matchers);
|
||||
|
||||
|
||||
Reference in New Issue
Block a user