feat(app): add jest testing #2
This commit is contained in:
parent
c29db6ffd1
commit
4697997c1f
@ -1,5 +1,8 @@
|
||||
{
|
||||
"extends": "ksv741",
|
||||
"env": {
|
||||
"jest": true
|
||||
},
|
||||
"rules": {
|
||||
"import/extensions": [
|
||||
"error", "ignorePackages", {
|
||||
|
||||
@ -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
|
||||
|
||||
8
configs/jest/babel-jest.config.js
Normal file
8
configs/jest/babel-jest.config.js
Normal file
@ -0,0 +1,8 @@
|
||||
module.exports = {
|
||||
presets: [
|
||||
'@babel/preset-env',
|
||||
['@babel/preset-react', {
|
||||
runtime: 'automatic',
|
||||
}],
|
||||
],
|
||||
};
|
||||
12
configs/jest/jest.config.js
Normal file
12
configs/jest/jest.config.js
Normal 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')],
|
||||
};
|
||||
1
configs/jest/setupTests.js
Normal file
1
configs/jest/setupTests.js
Normal file
@ -0,0 +1 @@
|
||||
import '@testing-library/jest-dom';
|
||||
9
jest.config.js
Normal file
9
jest.config.js
Normal 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'],
|
||||
};
|
||||
BIN
offline_node_modules/@adobe-css-tools-4.3.3.tgz
generated
Normal file
BIN
offline_node_modules/@adobe-css-tools-4.3.3.tgz
generated
Normal file
Binary file not shown.
BIN
offline_node_modules/@babel-plugin-syntax-bigint-7.8.3.tgz
generated
Normal file
BIN
offline_node_modules/@babel-plugin-syntax-bigint-7.8.3.tgz
generated
Normal file
Binary file not shown.
BIN
offline_node_modules/@bcoe-v8-coverage-0.2.3.tgz
generated
Normal file
BIN
offline_node_modules/@bcoe-v8-coverage-0.2.3.tgz
generated
Normal file
Binary file not shown.
BIN
offline_node_modules/@istanbuljs-load-nyc-config-1.1.0.tgz
generated
Normal file
BIN
offline_node_modules/@istanbuljs-load-nyc-config-1.1.0.tgz
generated
Normal file
Binary file not shown.
BIN
offline_node_modules/@istanbuljs-schema-0.1.3.tgz
generated
Normal file
BIN
offline_node_modules/@istanbuljs-schema-0.1.3.tgz
generated
Normal file
Binary file not shown.
BIN
offline_node_modules/@jest-console-29.7.0.tgz
generated
Normal file
BIN
offline_node_modules/@jest-console-29.7.0.tgz
generated
Normal file
Binary file not shown.
BIN
offline_node_modules/@jest-core-29.7.0.tgz
generated
Normal file
BIN
offline_node_modules/@jest-core-29.7.0.tgz
generated
Normal file
Binary file not shown.
BIN
offline_node_modules/@jest-environment-29.7.0.tgz
generated
Normal file
BIN
offline_node_modules/@jest-environment-29.7.0.tgz
generated
Normal file
Binary file not shown.
BIN
offline_node_modules/@jest-expect-29.7.0.tgz
generated
Normal file
BIN
offline_node_modules/@jest-expect-29.7.0.tgz
generated
Normal file
Binary file not shown.
BIN
offline_node_modules/@jest-expect-utils-29.7.0.tgz
generated
Normal file
BIN
offline_node_modules/@jest-expect-utils-29.7.0.tgz
generated
Normal file
Binary file not shown.
BIN
offline_node_modules/@jest-fake-timers-29.7.0.tgz
generated
Normal file
BIN
offline_node_modules/@jest-fake-timers-29.7.0.tgz
generated
Normal file
Binary file not shown.
BIN
offline_node_modules/@jest-globals-29.7.0.tgz
generated
Normal file
BIN
offline_node_modules/@jest-globals-29.7.0.tgz
generated
Normal file
Binary file not shown.
BIN
offline_node_modules/@jest-reporters-29.7.0.tgz
generated
Normal file
BIN
offline_node_modules/@jest-reporters-29.7.0.tgz
generated
Normal file
Binary file not shown.
BIN
offline_node_modules/@jest-source-map-29.6.3.tgz
generated
Normal file
BIN
offline_node_modules/@jest-source-map-29.6.3.tgz
generated
Normal file
Binary file not shown.
BIN
offline_node_modules/@jest-test-result-29.7.0.tgz
generated
Normal file
BIN
offline_node_modules/@jest-test-result-29.7.0.tgz
generated
Normal file
Binary file not shown.
BIN
offline_node_modules/@jest-test-sequencer-29.7.0.tgz
generated
Normal file
BIN
offline_node_modules/@jest-test-sequencer-29.7.0.tgz
generated
Normal file
Binary file not shown.
BIN
offline_node_modules/@jest-transform-29.7.0.tgz
generated
Normal file
BIN
offline_node_modules/@jest-transform-29.7.0.tgz
generated
Normal file
Binary file not shown.
BIN
offline_node_modules/@sinonjs-commons-3.0.1.tgz
generated
Normal file
BIN
offline_node_modules/@sinonjs-commons-3.0.1.tgz
generated
Normal file
Binary file not shown.
BIN
offline_node_modules/@sinonjs-fake-timers-10.3.0.tgz
generated
Normal file
BIN
offline_node_modules/@sinonjs-fake-timers-10.3.0.tgz
generated
Normal file
Binary file not shown.
BIN
offline_node_modules/@testing-library-dom-9.3.4.tgz
generated
Normal file
BIN
offline_node_modules/@testing-library-dom-9.3.4.tgz
generated
Normal file
Binary file not shown.
BIN
offline_node_modules/@testing-library-jest-dom-6.4.2.tgz
generated
Normal file
BIN
offline_node_modules/@testing-library-jest-dom-6.4.2.tgz
generated
Normal file
Binary file not shown.
BIN
offline_node_modules/@testing-library-react-14.2.2.tgz
generated
Normal file
BIN
offline_node_modules/@testing-library-react-14.2.2.tgz
generated
Normal file
Binary file not shown.
BIN
offline_node_modules/@tootallnate-once-2.0.0.tgz
generated
Normal file
BIN
offline_node_modules/@tootallnate-once-2.0.0.tgz
generated
Normal file
Binary file not shown.
BIN
offline_node_modules/@types-aria-query-5.0.4.tgz
generated
Normal file
BIN
offline_node_modules/@types-aria-query-5.0.4.tgz
generated
Normal file
Binary file not shown.
BIN
offline_node_modules/@types-babel__core-7.20.5.tgz
generated
Normal file
BIN
offline_node_modules/@types-babel__core-7.20.5.tgz
generated
Normal file
Binary file not shown.
BIN
offline_node_modules/@types-babel__generator-7.6.8.tgz
generated
Normal file
BIN
offline_node_modules/@types-babel__generator-7.6.8.tgz
generated
Normal file
Binary file not shown.
BIN
offline_node_modules/@types-babel__template-7.4.4.tgz
generated
Normal file
BIN
offline_node_modules/@types-babel__template-7.4.4.tgz
generated
Normal file
Binary file not shown.
BIN
offline_node_modules/@types-babel__traverse-7.20.5.tgz
generated
Normal file
BIN
offline_node_modules/@types-babel__traverse-7.20.5.tgz
generated
Normal file
Binary file not shown.
BIN
offline_node_modules/@types-graceful-fs-4.1.9.tgz
generated
Normal file
BIN
offline_node_modules/@types-graceful-fs-4.1.9.tgz
generated
Normal file
Binary file not shown.
BIN
offline_node_modules/@types-jest-29.5.12.tgz
generated
Normal file
BIN
offline_node_modules/@types-jest-29.5.12.tgz
generated
Normal file
Binary file not shown.
BIN
offline_node_modules/@types-jsdom-20.0.1.tgz
generated
Normal file
BIN
offline_node_modules/@types-jsdom-20.0.1.tgz
generated
Normal file
Binary file not shown.
BIN
offline_node_modules/@types-react-dom-18.2.22.tgz
generated
Normal file
BIN
offline_node_modules/@types-react-dom-18.2.22.tgz
generated
Normal file
Binary file not shown.
BIN
offline_node_modules/@types-stack-utils-2.0.3.tgz
generated
Normal file
BIN
offline_node_modules/@types-stack-utils-2.0.3.tgz
generated
Normal file
Binary file not shown.
BIN
offline_node_modules/@types-tough-cookie-4.0.5.tgz
generated
Normal file
BIN
offline_node_modules/@types-tough-cookie-4.0.5.tgz
generated
Normal file
Binary file not shown.
BIN
offline_node_modules/abab-2.0.6.tgz
generated
Normal file
BIN
offline_node_modules/abab-2.0.6.tgz
generated
Normal file
Binary file not shown.
BIN
offline_node_modules/acorn-globals-7.0.1.tgz
generated
Normal file
BIN
offline_node_modules/acorn-globals-7.0.1.tgz
generated
Normal file
Binary file not shown.
BIN
offline_node_modules/agent-base-6.0.2.tgz
generated
Normal file
BIN
offline_node_modules/agent-base-6.0.2.tgz
generated
Normal file
Binary file not shown.
BIN
offline_node_modules/ansi-escapes-4.3.2.tgz
generated
Normal file
BIN
offline_node_modules/ansi-escapes-4.3.2.tgz
generated
Normal file
Binary file not shown.
BIN
offline_node_modules/ansi-styles-5.2.0.tgz
generated
Normal file
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
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
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
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
BIN
offline_node_modules/babel-jest-29.7.0.tgz
generated
Normal file
Binary file not shown.
BIN
offline_node_modules/babel-plugin-istanbul-6.1.1.tgz
generated
Normal file
BIN
offline_node_modules/babel-plugin-istanbul-6.1.1.tgz
generated
Normal file
Binary file not shown.
BIN
offline_node_modules/babel-plugin-jest-hoist-29.6.3.tgz
generated
Normal file
BIN
offline_node_modules/babel-plugin-jest-hoist-29.6.3.tgz
generated
Normal file
Binary file not shown.
BIN
offline_node_modules/babel-preset-current-node-syntax-1.0.1.tgz
generated
Normal file
BIN
offline_node_modules/babel-preset-current-node-syntax-1.0.1.tgz
generated
Normal file
Binary file not shown.
BIN
offline_node_modules/babel-preset-jest-29.6.3.tgz
generated
Normal file
BIN
offline_node_modules/babel-preset-jest-29.6.3.tgz
generated
Normal file
Binary file not shown.
BIN
offline_node_modules/bser-2.1.1.tgz
generated
Normal file
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
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
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
BIN
offline_node_modules/char-regex-1.0.2.tgz
generated
Normal file
Binary file not shown.
BIN
offline_node_modules/cjs-module-lexer-1.2.3.tgz
generated
Normal file
BIN
offline_node_modules/cjs-module-lexer-1.2.3.tgz
generated
Normal file
Binary file not shown.
BIN
offline_node_modules/cliui-8.0.1.tgz
generated
Normal file
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
BIN
offline_node_modules/co-4.6.0.tgz
generated
Normal file
Binary file not shown.
BIN
offline_node_modules/collect-v8-coverage-1.0.2.tgz
generated
Normal file
BIN
offline_node_modules/collect-v8-coverage-1.0.2.tgz
generated
Normal file
Binary file not shown.
BIN
offline_node_modules/combined-stream-1.0.8.tgz
generated
Normal file
BIN
offline_node_modules/combined-stream-1.0.8.tgz
generated
Normal file
Binary file not shown.
BIN
offline_node_modules/create-jest-29.7.0.tgz
generated
Normal file
BIN
offline_node_modules/create-jest-29.7.0.tgz
generated
Normal file
Binary file not shown.
BIN
offline_node_modules/css.escape-1.5.1.tgz
generated
Normal file
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
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
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
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
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
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
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
BIN
offline_node_modules/deep-equal-2.2.3.tgz
generated
Normal file
Binary file not shown.
BIN
offline_node_modules/delayed-stream-1.0.0.tgz
generated
Normal file
BIN
offline_node_modules/delayed-stream-1.0.0.tgz
generated
Normal file
Binary file not shown.
BIN
offline_node_modules/detect-newline-3.1.0.tgz
generated
Normal file
BIN
offline_node_modules/detect-newline-3.1.0.tgz
generated
Normal file
Binary file not shown.
BIN
offline_node_modules/diff-sequences-29.6.3.tgz
generated
Normal file
BIN
offline_node_modules/diff-sequences-29.6.3.tgz
generated
Normal file
Binary file not shown.
BIN
offline_node_modules/dom-accessibility-api-0.5.16.tgz
generated
Normal file
BIN
offline_node_modules/dom-accessibility-api-0.5.16.tgz
generated
Normal file
Binary file not shown.
BIN
offline_node_modules/dom-accessibility-api-0.6.3.tgz
generated
Normal file
BIN
offline_node_modules/dom-accessibility-api-0.6.3.tgz
generated
Normal file
Binary file not shown.
BIN
offline_node_modules/domexception-4.0.0.tgz
generated
Normal file
BIN
offline_node_modules/domexception-4.0.0.tgz
generated
Normal file
Binary file not shown.
BIN
offline_node_modules/emittery-0.13.1.tgz
generated
Normal file
BIN
offline_node_modules/emittery-0.13.1.tgz
generated
Normal file
Binary file not shown.
BIN
offline_node_modules/es-get-iterator-1.1.3.tgz
generated
Normal file
BIN
offline_node_modules/es-get-iterator-1.1.3.tgz
generated
Normal file
Binary file not shown.
BIN
offline_node_modules/escape-string-regexp-2.0.0.tgz
generated
Normal file
BIN
offline_node_modules/escape-string-regexp-2.0.0.tgz
generated
Normal file
Binary file not shown.
BIN
offline_node_modules/escodegen-2.1.0.tgz
generated
Normal file
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
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
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
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
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
BIN
offline_node_modules/form-data-4.0.0.tgz
generated
Normal file
Binary file not shown.
BIN
offline_node_modules/get-caller-file-2.0.5.tgz
generated
Normal file
BIN
offline_node_modules/get-caller-file-2.0.5.tgz
generated
Normal file
Binary file not shown.
BIN
offline_node_modules/get-package-type-0.1.0.tgz
generated
Normal file
BIN
offline_node_modules/get-package-type-0.1.0.tgz
generated
Normal file
Binary file not shown.
BIN
offline_node_modules/html-encoding-sniffer-3.0.0.tgz
generated
Normal file
BIN
offline_node_modules/html-encoding-sniffer-3.0.0.tgz
generated
Normal file
Binary file not shown.
BIN
offline_node_modules/http-proxy-agent-5.0.0.tgz
generated
Normal file
BIN
offline_node_modules/http-proxy-agent-5.0.0.tgz
generated
Normal file
Binary file not shown.
BIN
offline_node_modules/https-proxy-agent-5.0.1.tgz
generated
Normal file
BIN
offline_node_modules/https-proxy-agent-5.0.1.tgz
generated
Normal file
Binary file not shown.
BIN
offline_node_modules/iconv-lite-0.6.3.tgz
generated
Normal file
BIN
offline_node_modules/iconv-lite-0.6.3.tgz
generated
Normal file
Binary file not shown.
BIN
offline_node_modules/indent-string-4.0.0.tgz
generated
Normal file
BIN
offline_node_modules/indent-string-4.0.0.tgz
generated
Normal file
Binary file not shown.
BIN
offline_node_modules/is-arguments-1.1.1.tgz
generated
Normal file
BIN
offline_node_modules/is-arguments-1.1.1.tgz
generated
Normal file
Binary file not shown.
BIN
offline_node_modules/is-generator-fn-2.1.0.tgz
generated
Normal file
BIN
offline_node_modules/is-generator-fn-2.1.0.tgz
generated
Normal file
Binary file not shown.
BIN
offline_node_modules/is-potential-custom-element-name-1.0.1.tgz
generated
Normal file
BIN
offline_node_modules/is-potential-custom-element-name-1.0.1.tgz
generated
Normal file
Binary file not shown.
BIN
offline_node_modules/istanbul-lib-coverage-3.2.2.tgz
generated
Normal file
BIN
offline_node_modules/istanbul-lib-coverage-3.2.2.tgz
generated
Normal file
Binary file not shown.
BIN
offline_node_modules/istanbul-lib-instrument-5.2.1.tgz
generated
Normal file
BIN
offline_node_modules/istanbul-lib-instrument-5.2.1.tgz
generated
Normal file
Binary file not shown.
BIN
offline_node_modules/istanbul-lib-instrument-6.0.2.tgz
generated
Normal file
BIN
offline_node_modules/istanbul-lib-instrument-6.0.2.tgz
generated
Normal file
Binary file not shown.
BIN
offline_node_modules/istanbul-lib-report-3.0.1.tgz
generated
Normal file
BIN
offline_node_modules/istanbul-lib-report-3.0.1.tgz
generated
Normal file
Binary file not shown.
Some files were not shown because too many files have changed in this diff Show More
Loading…
x
Reference in New Issue
Block a user