From 2b36eed7d4146c442bcf5468823a88813f6d2c9d Mon Sep 17 00:00:00 2001 From: Ariel Gentile Date: Fri, 18 Oct 2024 10:50:28 -0300 Subject: [PATCH] e2e tests Signed-off-by: Ariel Gentile --- package.json | 1 + packages/client/jest.config.ts | 5 +---- packages/server/test/jest-e2e.json | 3 ++- 3 files changed, 4 insertions(+), 5 deletions(-) diff --git a/package.json b/package.json index eb6df78..4a762cd 100644 --- a/package.json +++ b/package.json @@ -15,6 +15,7 @@ "format": "yarn prettier --write", "check-format": "yarn prettier --list-different", "test": "yarn workspaces run test --passWithNoTests", + "test:e2e": "jest --config ./packages/server/test/jest-e2e.json", "lint": "eslint --ignore-path .gitignore --ignore-pattern '**/esm/' .", "validate": "yarn lint && yarn check-types && yarn check-format" }, diff --git a/packages/client/jest.config.ts b/packages/client/jest.config.ts index 457d6c8..9e8c0e4 100644 --- a/packages/client/jest.config.ts +++ b/packages/client/jest.config.ts @@ -15,10 +15,7 @@ const config: Config.InitialOptions = { ], '^.+\\.jsx?$': require.resolve('babel-jest'), }, - moduleNameMapper: { - // Force module uuid to resolve with the CJS entry point, because Jest does not support package.json.exports. See https://github.com/uuidjs/uuid/issues/451 - uuid: require.resolve('uuid'), - }, + moduleNameMapper: { '^uuid$': 'uuid' }, } export default config diff --git a/packages/server/test/jest-e2e.json b/packages/server/test/jest-e2e.json index e9d912f..36e4177 100644 --- a/packages/server/test/jest-e2e.json +++ b/packages/server/test/jest-e2e.json @@ -5,5 +5,6 @@ "testRegex": ".e2e-spec.ts$", "transform": { "^.+\\.(t|j)s$": "ts-jest" - } + }, + "moduleNameMapper": { "^uuid$": "uuid" } }