Skip to content
This repository was archived by the owner on Feb 13, 2023. It is now read-only.

Commit 661c368

Browse files
authored
fix: unit tests not working (#24)
this commit was made because after moving the whole repo from packages/theme to the template-magento repo unit tests stopped working this is because all packages in magento2 repo are in the repo root's node_modules, so packages/theme doesn't contain them normally. this changes in the context of template-magento also reverted some changes made during the rc7 release which attempted to fix the issue
1 parent 22ec281 commit 661c368

File tree

4 files changed

+4
-14
lines changed

4 files changed

+4
-14
lines changed

jest.config.js

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -2,11 +2,7 @@
22
module.exports = {
33
globals: {
44
__DEV__: true,
5-
'ts-jest': {
6-
tsConfig: 'tsconfig.spec.json'
7-
}
85
},
9-
106
coverageReporters: ['lcov'],
117

128
coverageThreshold: { global: {} },

package.json

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -76,9 +76,9 @@
7676
"cypress-tags": "^0.3.0",
7777
"deepmerge": "^4.2.2",
7878
"ejs": "^3.1.6",
79-
"jest": "^28.1.0",
79+
"jest": "^27.5.1",
8080
"jest-date-mock": "^1.0.8",
81-
"jest-environment-jsdom": "^28.1.0",
81+
"jest-environment-jsdom": "^27.5.1",
8282
"jest-localstorage-mock": "^2.4.19",
8383
"jest-silent-reporter": "^0.5.0",
8484
"jest-transform-stub": "^2.0.0",
@@ -91,7 +91,7 @@
9191
"mochawesome-merge": "^4.2.1",
9292
"mochawesome-report-generator": "^6.0.1",
9393
"npm-check-updates": "^12.1.0",
94-
"ts-jest": "^28.0.3",
94+
"ts-jest": "^27.1.5",
9595
"ts-loader": "^8.1.0",
9696
"ts-node": "^10.4.0",
9797
"tslib": "^2.3.1",

tsconfig.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -33,7 +33,7 @@
3333
"@nuxt/image",
3434
"jest"
3535
],
36-
"typeRoots": ["../../node_modules/@types"],
36+
"typeRoots": ["../../node_modules/@types", "./node_modules/@types"],
3737
"resolveJsonModule": true,
3838
"rootDir": "./",
3939
"declarationDir": "./lib",

tsconfig.spec.json

Lines changed: 0 additions & 6 deletions
This file was deleted.

0 commit comments

Comments
 (0)