diff --git a/jest.config.js b/jest.config.js deleted file mode 100644 index 5473099..0000000 --- a/jest.config.js +++ /dev/null @@ -1,36 +0,0 @@ -module.exports = { - preset: 'ts-jest', - testEnvironment: 'jsdom', - roots: ['/src'], - testMatch: ['**/__tests__/**/*.test.{ts,tsx}', '**/*.test.{ts,tsx}'], - collectCoverageFrom: [ - 'src/**/*.{ts,tsx}', - '!src/**/*.d.ts', - '!src/**/*.stories.{ts,tsx}', - '!src/**/__tests__/**', - ], - coverageThreshold: { - global: { - branches: 35, - functions: 45, - lines: 45, - statements: 45, - }, - }, - coverageReporters: ['text', 'lcov', 'html', 'json'], - coverageDirectory: 'coverage', - moduleFileExtensions: ['ts', 'tsx', 'js', 'jsx', 'json', 'node'], - moduleNameMapper: { - '^@/(.*)$': '/src/$1', - }, - transform: { - '^.+\\.(ts|tsx)$': 'ts-jest', - }, - transformIgnorePatterns: [ - 'node_modules/(?!(nanoid|next-auth|@auth)/)', - ], - setupFilesAfterEnv: ['/jest.setup.js'], - testTimeout: 10000, - verbose: true, - maxWorkers: '50%', -}; \ No newline at end of file diff --git a/jest.config.js b/jest.config.js new file mode 120000 index 0000000..7f013e1 --- /dev/null +++ b/jest.config.js @@ -0,0 +1 @@ +config/test/jest.config.js \ No newline at end of file diff --git a/package.json b/package.json index af8861b..b793076 100644 --- a/package.json +++ b/package.json @@ -12,6 +12,7 @@ "test:unit": "jest", "test:coverage": "jest --coverage", "test:coverage:check": "jest --coverage --ci", + "coverage:report": "open coverage/lcov-report/index.html", "test:e2e": "cd e2e && npm test", "test:smoke": "cd e2e && npx playwright test --grep @smoke", "test:tier:fast": "cd e2e && TEST_TIER=fast npx playwright test --config=playwright.config.tiered.ts", @@ -45,7 +46,8 @@ "lighthouse:assert": "lhci assert", "lighthouse:upload": "lhci upload", "lighthouse:desktop": "lhci autorun --settings.preset=desktop", - "lighthouse:mobile": "lhci autorun --settings.preset=mobile" + "lighthouse:mobile": "lhci autorun --settings.preset=mobile", + "prepare": "husky" }, "dependencies": { "@antv/g2": "^5.4.8",