Skip to content

Commit

Permalink
Merge pull request #541 from bounswe/feature/FE-test-components
Browse files Browse the repository at this point in the history
[FE] Add jest test components
  • Loading branch information
Halil-Ibrahim-Kasapoglu authored Dec 16, 2024
2 parents 6f3f7d7 + af11473 commit 7f9d7b6
Show file tree
Hide file tree
Showing 22 changed files with 4,906 additions and 3,128 deletions.
14 changes: 13 additions & 1 deletion frontend/jest.config.js
Original file line number Diff line number Diff line change
Expand Up @@ -6,5 +6,17 @@ module.exports = {
'\\.(css|less|scss|sass)$': 'identity-obj-proxy', // Mock CSS imports
"\\.(png|jpg|jpeg|gif|webp|svg)$": "<rootDir>/__mocks__/fileMock.js",
},
testEnvironment: 'jsdom', // Simulates a browser-like environment
testEnvironment: 'jest-environment-jsdom', // Simulates a browser-like environment
collectCoverage: true,
collectCoverageFrom: [
"src/**/*.{js,jsx,ts,tsx}", // Adjust the pattern to match your project structure
"!src/**/*.test.{js,jsx,ts,tsx}", // Exclude test files
"!src/serviceWorker.js", // Exclude specific files if needed
"!src/index.js", // Exclude specific files if needed
"!src/service/**", // Exclude the src/service directory
"!src/data/**", // Exclude the src/data directory
"!src/App.js" // Exclude the App.js file
],
coverageDirectory: "coverage",
coverageReporters: ["text", "lcov"],
};
Loading

0 comments on commit 7f9d7b6

Please sign in to comment.