Skip to content

Commit

Permalink
Merge pull request #1493 from skaut/config-js
Browse files Browse the repository at this point in the history
Using .config.js files
  • Loading branch information
marekdedic authored Jun 18, 2024
2 parents 667edfa + ae40d0d commit 85e156d
Show file tree
Hide file tree
Showing 3 changed files with 30 additions and 35 deletions.
29 changes: 29 additions & 0 deletions packages/frontend/jest.config.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,29 @@
/* eslint-env node */

/** @type {import('jest').Config} */
module.exports = {
collectCoverage: true,
collectCoverageFrom: [
"src/**/*.{ts,tsx}",
"!src/index.tsx",
"!src/config.ts",
"!src/globalStyles.ts",
],
setupFilesAfterEnv: ["<rootDir>/__tests__/setupTests.ts"],
testMatch: ["<rootDir>/__tests__/**/*.test.{js,jsx,ts,tsx}"],
testEnvironment: "jsdom",
transform: {
"^.+\\.jsx?$": [
"babel-jest",
{
presets: ["react-app"],
},
],
"^.+\\.tsx?$": "ts-jest",
},
transformIgnorePatterns: ["node_modules/(?!react-markdown)/"],
moduleNameMapper: {
"\\.svg$": "<rootDir>/__mocks__/fileMock.ts",
},
resetMocks: true,
};
34 changes: 0 additions & 34 deletions packages/frontend/jest.config.json

This file was deleted.

2 changes: 1 addition & 1 deletion packages/frontend/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@
"build:public": "mkdir -p dist && cp -r public/* dist/",
"build:webpack": "webpack",
"build": "run-p -c --aggregate-output build:*",
"lint": "eslint --color webpack.config.js 'src/**/*' '__mocks__/**/*' '__tests__/**/*'",
"lint": "eslint --color \"src/**/*\" \"__mocks__/**/*\" \"__tests__/**/*\" \"*.config.{js,ts}\"",
"test": "jest",
"test-accept": "jest --updateSnapshot"
},
Expand Down

0 comments on commit 85e156d

Please sign in to comment.