Skip to content

Commit

Permalink
configured jest
Browse files Browse the repository at this point in the history
  • Loading branch information
shamith09 committed Jun 27, 2023
1 parent 4f56eb9 commit fae5e25
Show file tree
Hide file tree
Showing 46 changed files with 1,583 additions and 122 deletions.
1 change: 1 addition & 0 deletions babel.config.js
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
module.exports = { presets: ['@babel/preset-env'] };
2 changes: 1 addition & 1 deletion internals/generators/component/index.tsx.hbs
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ import React, { memo } from 'react';
import * as React from 'react';
{{/if}}
{{#if wantStyledComponents}}
import styled from 'styled-components/macro';
import styled from 'styled-components';
{{/if}}
{{#if wantTranslations}}
import { useTranslation } from 'react-i18next';
Expand Down
29 changes: 25 additions & 4 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@
"version": "0.1.0",
"private": true,
"dependencies": {
"@babel/preset-env": "7.22.5",
"@emotion/react": "11.10.5",
"@emotion/styled": "11.10.5",
"@mui/icons-material": "5.11.11",
Expand All @@ -26,6 +27,7 @@
"@types/webpack": "^5.28.0",
"@types/webpack-env": "^1.18.0",
"@vercel/analytics": "0.1.11",
"babel-jest": "29.5.0",
"browser-image-compression": "2.0.0",
"chalk": "4.1.2",
"compressorjs": "1.1.1",
Expand All @@ -42,7 +44,8 @@
"i18next-scanner": "4.0.0",
"inquirer": "7.3.3",
"inquirer-directory": "2.2.0",
"jest-styled-components": "7.1.1",
"jest": "29.5.0",
"jsdom": "22.1.0",
"jwt-decode": "3.1.2",
"lint-staged": "13.0.3",
"node-plop": "0.26.3",
Expand Down Expand Up @@ -72,6 +75,7 @@
"stylelint-config-recommended": "9.0.0",
"stylelint-config-styled-components": "0.1.1",
"stylelint-processor-styled-components": "1.10.0",
"ts-jest": "29.1.0",
"ts-node": "10.9.1",
"typescript": "4.6.4",
"uuid": "9.0.0",
Expand All @@ -80,7 +84,7 @@
"scripts": {
"start": "react-scripts start",
"build": "react-scripts build",
"test": "react-scripts test",
"test": "jest",
"eject": "react-scripts eject",
"start:prod": "yarn run build && serve -s build",
"test:generators": "ts-node ./internals/testing/generators/test-generators.ts",
Expand Down Expand Up @@ -138,10 +142,27 @@
"lines": 90,
"statements": 90
}
}
},
"preset": "ts-jest",
"transform": {
"^.+\\.(ts|tsx)?$": "ts-jest",
"^.+\\.(js|jsx)$": "babel-jest"
},
"moduleNameMapper": {
"^utils/loadable$": "<rootDir>/src/utils/loadable",
"^utils/useToken$": "<rootDir>/src/utils/useToken",
"^utils/apiRequest$": "<rootDir>/src/utils/apiRequest",
"^styles/global-styles$": "<rootDir>/src/styles/global-styles",
"^images$": "<rootDir>/src/images/index"
},
"transformIgnorePatterns": [
"/node_modules/(?!.*\\.(js|jsx|ts|tsx)$)",
"/images/(?!.*\\.(.*)$)"
]
},
"devDependencies": {
"@babel/plugin-proposal-private-property-in-object": "7.21.11",
"@types/react-beautiful-dnd": "13.1.4"
"@types/react-beautiful-dnd": "13.1.4",
"jest-environment-jsdom": "29.5.0"
}
}
Loading

0 comments on commit fae5e25

Please sign in to comment.