Skip to content

Commit

Permalink
add separate setup file, fix depdncy
Browse files Browse the repository at this point in the history
  • Loading branch information
yasirazgar authored and julianguyen committed Oct 14, 2022
1 parent 16a6afc commit 5d865a1
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 3 deletions.
1 change: 0 additions & 1 deletion client/app/components/Chart/__tests__/Chart.spec.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,6 @@
import React from 'react';
import { render } from '@testing-library/react';
import { Chart } from 'components/Chart/index';
import 'jest-canvas-mock';

const renderComponent = ({ chartType }) => render(
<Chart
Expand Down
6 changes: 4 additions & 2 deletions client/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -112,15 +112,17 @@
"webpack": "^5.74.0",
"webpack-cli": "^3.3.11",
"webpack-manifest-plugin": "^5.0.0",
"yml-loader": "^2.1.0"
"yml-loader": "^2.1.0",
"jest-canvas-mock": "^2.4.0"
},
"jest": {
"moduleNameMapper": {
"\\.scss$": "identity-obj-proxy",
"^.+\\.svg$": "<rootDir>/jest/svgTransform.js"
},
"setupFiles": [
"./app/libs/testHelper.js"
"./app/libs/testHelper.js",
"jest-canvas-mock"
],
"setupFilesAfterEnv": [
"@testing-library/jest-dom/extend-expect"
Expand Down

0 comments on commit 5d865a1

Please sign in to comment.