mirror of
https://github.com/coder/coder.git
synced 2025-07-12 00:14:10 +00:00
- Remove ChartJS in favor of Recharts - Migrate ActiveUserChart to use the new chart design <img width="1624" alt="Screenshot 2025-05-23 at 15 00 03" src="https://github.com/user-attachments/assets/5f451a88-f2ef-4139-a888-c0358eb8cf17" />
67 lines
1.7 KiB
TypeScript
67 lines
1.7 KiB
TypeScript
module.exports = {
|
|
// Use a big timeout for CI.
|
|
testTimeout: 20_000,
|
|
maxWorkers: 8,
|
|
projects: [
|
|
{
|
|
displayName: "test",
|
|
roots: ["<rootDir>"],
|
|
setupFiles: ["./jest.polyfills.js"],
|
|
setupFilesAfterEnv: ["./jest.setup.ts"],
|
|
extensionsToTreatAsEsm: [".ts"],
|
|
transform: {
|
|
"^.+\\.(t|j)sx?$": [
|
|
"@swc/jest",
|
|
{
|
|
jsc: {
|
|
transform: {
|
|
react: {
|
|
runtime: "automatic",
|
|
importSource: "@emotion/react",
|
|
},
|
|
},
|
|
experimental: {
|
|
plugins: [["jest_workaround", {}]],
|
|
},
|
|
},
|
|
},
|
|
],
|
|
},
|
|
testEnvironment: "jest-fixed-jsdom",
|
|
testEnvironmentOptions: {
|
|
customExportConditions: [""],
|
|
},
|
|
testRegex: "(/__tests__/.*|(\\.|/)(test|spec))\\.tsx?$",
|
|
testPathIgnorePatterns: [
|
|
"/node_modules/",
|
|
"/e2e/",
|
|
// TODO: This test is timing out after upgrade a few Jest dependencies
|
|
// and I was not able to figure out why. When running it specifically, I
|
|
// can see many act warnings that may can help us to find the issue.
|
|
"/usePaginatedQuery.test.ts",
|
|
],
|
|
transformIgnorePatterns: [],
|
|
moduleDirectories: ["node_modules", "<rootDir>/src"],
|
|
moduleNameMapper: {
|
|
"\\.css$": "<rootDir>/src/testHelpers/styleMock.ts",
|
|
"^@fontsource": "<rootDir>/src/testHelpers/styleMock.ts",
|
|
},
|
|
},
|
|
],
|
|
collectCoverageFrom: [
|
|
// included files
|
|
"<rootDir>/**/*.ts",
|
|
"<rootDir>/**/*.tsx",
|
|
// excluded files
|
|
"!<rootDir>/**/*.stories.tsx",
|
|
"!<rootDir>/_jest/**/*.*",
|
|
"!<rootDir>/api.ts",
|
|
"!<rootDir>/coverage/**/*.*",
|
|
"!<rootDir>/e2e/**/*.*",
|
|
"!<rootDir>/jest-runner.eslint.config.js",
|
|
"!<rootDir>/jest.config.js",
|
|
"!<rootDir>/out/**/*.*",
|
|
"!<rootDir>/storybook-static/**/*.*",
|
|
],
|
|
};
|