From a430284aa21e3ae1f0d5654e55b2ad2852519cc2 Mon Sep 17 00:00:00 2001 From: wwf <yearningwang@iqtogether.com> Date: 星期三, 04 六月 2025 15:17:49 +0800 Subject: [PATCH] 初始化 --- jest.config.ts | 23 +++++++++++------------ 1 files changed, 11 insertions(+), 12 deletions(-) diff --git a/jest.config.ts b/jest.config.ts index ebeb2f7..232f902 100644 --- a/jest.config.ts +++ b/jest.config.ts @@ -26,7 +26,7 @@ clearMocks: true, // Indicates whether the coverage information should be collected while executing the test - collectCoverage: true, + collectCoverage: false, // An array of glob patterns indicating a set of files for which coverage information should be collected // collectCoverageFrom: undefined, @@ -43,13 +43,12 @@ coverageProvider: 'v8', // A list of reporter names that Jest uses when writing coverage reports - coverageReporters: [ - 'json', - 'text', - 'text-summary', - 'lcov', - 'clover', - ], + // coverageReporters: [ + // "json", + // "text", + // "lcov", + // "clover" + // ], // An object that configures minimum threshold enforcement for coverage results // coverageThreshold: undefined, @@ -99,7 +98,7 @@ // A map from regular expressions to module names or to arrays of module names that allow to stub out resources with a single module moduleNameMapper: { - '^@/(.*)$': '<rootDir>/$1', + '^@/components/(.*)$': '<rootDir>/components/$1', '^lodash-es$': 'lodash', }, @@ -134,7 +133,7 @@ // restoreMocks: false, // The root directory that Jest should scan for tests and modules within - rootDir: './', + // rootDir: undefined, // A list of paths to directories that Jest should use to search for files in // roots: [ @@ -148,7 +147,7 @@ // setupFiles: [], // A list of paths to modules that run some code to configure or set up the testing framework before each test - setupFilesAfterEnv: ['<rootDir>/jest.setup.ts'], + // setupFilesAfterEnv: [], // The number of seconds after which a test is considered as slow and reported as such in the results. // slowTestThreshold: 5, @@ -157,7 +156,7 @@ // snapshotSerializers: [], // The test environment that will be used for testing - testEnvironment: '@happy-dom/jest-environment', + testEnvironment: 'jsdom', // Options that will be passed to the testEnvironment // testEnvironmentOptions: {}, -- Gitblit v1.8.0