diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml index abfa3af..1425132 100644 --- a/.gitlab-ci.yml +++ b/.gitlab-ci.yml @@ -26,7 +26,7 @@ lint: test: stage: checking script: - - yarn run test + - yarn run test:start only: - merge_requests diff --git a/.yarn/install-state.gz b/.yarn/install-state.gz index a448b9f..9f2fe1d 100644 Binary files a/.yarn/install-state.gz and b/.yarn/install-state.gz differ diff --git a/configs/jest/__mocks__/fileMock.js b/configs/jest/__mocks__/fileMock.js new file mode 100644 index 0000000..86059f3 --- /dev/null +++ b/configs/jest/__mocks__/fileMock.js @@ -0,0 +1 @@ +module.exports = 'test-file-stub'; diff --git a/jest.config.js b/jest.config.js index 9a8b35b..f0804c4 100644 --- a/jest.config.js +++ b/jest.config.js @@ -7,4 +7,9 @@ module.exports = { }, setupFilesAfterEnv: ['./configs/jest/setupTests.js'], modulePaths: ['src'], + moduleNameMapper: { + '\\.(jpg|jpeg|png|gif|eot|otf|webp|svg|ttf|woff|woff2|mp4|webm|wav|mp3|m4a|aac|oga)$': + './configs/jest/__mocks__/fileMock.js', + '\\.(css|less|scss)$': 'identity-obj-proxy', + }, }; diff --git a/offline_node_modules/harmony-reflect-npm-1.6.2-47a9f53361-fa5b251fbe.zip b/offline_node_modules/harmony-reflect-npm-1.6.2-47a9f53361-fa5b251fbe.zip new file mode 100644 index 0000000..f0ec949 Binary files /dev/null and b/offline_node_modules/harmony-reflect-npm-1.6.2-47a9f53361-fa5b251fbe.zip differ diff --git a/offline_node_modules/identity-obj-proxy-npm-3.0.0-080ab9ac1e-a3fc4de004.zip b/offline_node_modules/identity-obj-proxy-npm-3.0.0-080ab9ac1e-a3fc4de004.zip new file mode 100644 index 0000000..741008a Binary files /dev/null and b/offline_node_modules/identity-obj-proxy-npm-3.0.0-080ab9ac1e-a3fc4de004.zip differ diff --git a/package.json b/package.json index f1cf1d4..b0b99f6 100644 --- a/package.json +++ b/package.json @@ -8,7 +8,8 @@ "build:prod": "ksv741-react-scripts build --env mode=production", "analyze:prod": "ksv741-react-scripts build --env mode=production analyze=true", "lint": "eslint src", - "test": "jest", + "test:start": "jest", + "test:coverage": "jest --coverage", "release": "standard-version" }, "engines": { @@ -31,6 +32,7 @@ "dependencies": { "classnames": "2.5.1", "normalize.css": "8.0.1", + "prop-types": "15.8.1", "react": "18.2.0", "react-dom": "18.2.0", "react-router-dom": "6.22.3" @@ -48,6 +50,7 @@ "eslint-config-ksv741": "0.0.2", "eslint-import-resolver-webpack": "0.13.8", "husky": "9.0.11", + "identity-obj-proxy": "3.0.0", "jest": "29.7.0", "jest-environment-jsdom": "29.7.0", "ksv741-react-scripts": "0.3.1", diff --git a/yarn.lock b/yarn.lock index d5e3031..2141898 100644 --- a/yarn.lock +++ b/yarn.lock @@ -8408,6 +8408,13 @@ __metadata: languageName: node linkType: hard +"harmony-reflect@npm:^1.4.6": + version: 1.6.2 + resolution: "harmony-reflect@npm:1.6.2" + checksum: 10c0/fa5b251fbeff0e2d925f0bfb5ffe39e0627639e998c453562d6a39e41789c15499649dc022178c807cf99bfb97e7b974bbbc031ba82078a26be7b098b9bc2b1a + languageName: node + linkType: hard + "has-bigints@npm:^1.0.1, has-bigints@npm:^1.0.2": version: 1.0.2 resolution: "has-bigints@npm:1.0.2" @@ -8746,6 +8753,15 @@ __metadata: languageName: node linkType: hard +"identity-obj-proxy@npm:3.0.0": + version: 3.0.0 + resolution: "identity-obj-proxy@npm:3.0.0" + dependencies: + harmony-reflect: "npm:^1.4.6" + checksum: 10c0/a3fc4de0042d7b45bf8652d5596c80b42139d8625c9cd6a8834e29e1b6dce8fccabd1228e08744b78677a19ceed7201a32fed8ca3dc3e4852e8fee24360a6cfc + languageName: node + linkType: hard + "ignore@npm:^5.2.0, ignore@npm:^5.2.4": version: 5.3.1 resolution: "ignore@npm:5.3.1" @@ -10886,11 +10902,13 @@ __metadata: eslint-config-ksv741: "npm:0.0.2" eslint-import-resolver-webpack: "npm:0.13.8" husky: "npm:9.0.11" + identity-obj-proxy: "npm:3.0.0" jest: "npm:29.7.0" jest-environment-jsdom: "npm:29.7.0" ksv741-react-scripts: "npm:0.3.1" lint-staged: "npm:15.2.2" normalize.css: "npm:8.0.1" + prop-types: "npm:15.8.1" react: "npm:18.2.0" react-dom: "npm:18.2.0" react-router-dom: "npm:6.22.3" @@ -12513,7 +12531,7 @@ __metadata: languageName: node linkType: hard -"prop-types@npm:^15.8.1": +"prop-types@npm:15.8.1, prop-types@npm:^15.8.1": version: 15.8.1 resolution: "prop-types@npm:15.8.1" dependencies: