feat(app): add jest testing #2

This commit is contained in:
Sergey Krylov 2024-03-25 06:40:41 +03:00
parent c29db6ffd1
commit 4697997c1f
186 changed files with 1645 additions and 54 deletions

View File

@ -1,5 +1,8 @@
{
"extends": "ksv741",
"env": {
"jest": true
},
"rules": {
"import/extensions": [
"error", "ignorePackages", {

View File

@ -7,3 +7,4 @@
- `build:prod` - build application
- `analyze:prod` - start analyze server on [`http://127.0.0.1:8888`](http://127.0.0.1:8888)
- `lint` - linting files via ESLint
- `test` - run test via Jest

View File

@ -0,0 +1,8 @@
module.exports = {
presets: [
'@babel/preset-env',
['@babel/preset-react', {
runtime: 'automatic',
}],
],
};

View File

@ -0,0 +1,12 @@
const path = require('path');
module.exports = {
testEnvironment: 'jsdom',
rootDir: '../../',
transform: {
'\\.jsx?$': ['babel-jest', {
configFile: path.resolve(__dirname, 'babel-jest.config.js'),
}],
},
setupFilesAfterEnv: [path.resolve(__dirname, 'setupTests.js')],
};

View File

@ -0,0 +1 @@
import '@testing-library/jest-dom';

9
jest.config.js Normal file
View File

@ -0,0 +1,9 @@
module.exports = {
testEnvironment: 'jsdom',
transform: {
'\\.jsx?$': ['babel-jest', {
configFile: './configs/jest/babel-jest.config.js',
}],
},
setupFilesAfterEnv: ['./configs/jest/setupTests.js'],
};

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

BIN
offline_node_modules/@jest-core-29.7.0.tgz generated Normal file

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

BIN
offline_node_modules/abab-2.0.6.tgz generated Normal file

Binary file not shown.

Binary file not shown.

BIN
offline_node_modules/agent-base-6.0.2.tgz generated Normal file

Binary file not shown.

Binary file not shown.

BIN
offline_node_modules/ansi-styles-5.2.0.tgz generated Normal file

Binary file not shown.

BIN
offline_node_modules/argparse-1.0.10.tgz generated Normal file

Binary file not shown.

BIN
offline_node_modules/aria-query-5.1.3.tgz generated Normal file

Binary file not shown.

BIN
offline_node_modules/asynckit-0.4.0.tgz generated Normal file

Binary file not shown.

BIN
offline_node_modules/babel-jest-29.7.0.tgz generated Normal file

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

BIN
offline_node_modules/bser-2.1.1.tgz generated Normal file

Binary file not shown.

BIN
offline_node_modules/camelcase-5.3.1.tgz generated Normal file

Binary file not shown.

BIN
offline_node_modules/chalk-3.0.0.tgz generated Normal file

Binary file not shown.

BIN
offline_node_modules/char-regex-1.0.2.tgz generated Normal file

Binary file not shown.

Binary file not shown.

BIN
offline_node_modules/cliui-8.0.1.tgz generated Normal file

Binary file not shown.

BIN
offline_node_modules/co-4.6.0.tgz generated Normal file

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

BIN
offline_node_modules/css.escape-1.5.1.tgz generated Normal file

Binary file not shown.

BIN
offline_node_modules/cssom-0.3.8.tgz generated Normal file

Binary file not shown.

BIN
offline_node_modules/cssom-0.5.0.tgz generated Normal file

Binary file not shown.

BIN
offline_node_modules/cssstyle-2.3.0.tgz generated Normal file

Binary file not shown.

BIN
offline_node_modules/data-urls-3.0.2.tgz generated Normal file

Binary file not shown.

BIN
offline_node_modules/decimal.js-10.4.3.tgz generated Normal file

Binary file not shown.

BIN
offline_node_modules/dedent-1.5.1.tgz generated Normal file

Binary file not shown.

BIN
offline_node_modules/deep-equal-2.2.3.tgz generated Normal file

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

BIN
offline_node_modules/emittery-0.13.1.tgz generated Normal file

Binary file not shown.

Binary file not shown.

Binary file not shown.

BIN
offline_node_modules/escodegen-2.1.0.tgz generated Normal file

Binary file not shown.

BIN
offline_node_modules/esprima-4.0.1.tgz generated Normal file

Binary file not shown.

BIN
offline_node_modules/exit-0.1.2.tgz generated Normal file

Binary file not shown.

BIN
offline_node_modules/expect-29.7.0.tgz generated Normal file

Binary file not shown.

BIN
offline_node_modules/fb-watchman-2.0.2.tgz generated Normal file

Binary file not shown.

BIN
offline_node_modules/form-data-4.0.0.tgz generated Normal file

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

BIN
offline_node_modules/iconv-lite-0.6.3.tgz generated Normal file

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Some files were not shown because too many files have changed in this diff Show More