From 7108c642f4ff6dc5f0c4d30b8a8960064ff8e90f Mon Sep 17 00:00:00 2001 From: Kristóf Marussy Date: Fri, 31 Dec 2021 01:52:28 +0100 Subject: test: Add tests for main package - Changed jest to run from the root package and reference the packages as projects. This required moving the base jest config file away from the project root. - Module isolation seems to prevent ts-jest from loading the shared package, so we disabled it for now. - To better facilitate mocking, services should be split into interfaces and implementation - Had to downgrade to chald 4.1.2 as per https://github.com/chalk/chalk/releases/tag/v5.0.0 at least until https://github.com/microsoft/TypeScript/issues/46452 is resolved. --- packages/main/package.json | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'packages/main/package.json') diff --git a/packages/main/package.json b/packages/main/package.json index 99451bd..eb2ecf6 100644 --- a/packages/main/package.json +++ b/packages/main/package.json @@ -10,7 +10,7 @@ "dependencies": { "@sophie/service-shared": "workspace:*", "@sophie/shared": "workspace:*", - "chalk": "^5.0.0", + "chalk": "^4.1.2", "electron": "16.0.5", "json5": "^2.2.0", "lodash-es": "^4.17.21", @@ -27,6 +27,7 @@ "@types/node": "^17.0.5", "electron-devtools-installer": "^3.2.0", "esbuild": "^0.14.9", + "jest": "^27.4.5", "rimraf": "^3.0.2", "typescript": "^4.5.4" } -- cgit v1.2.3-70-g09d2