From 414a6efa2afecf272faddd902e736dd8e44d20a7 Mon Sep 17 00:00:00 2001 From: David Baumgold Date: Sun, 13 Oct 2019 14:15:24 +0200 Subject: [PATCH] ts-jest --- .../package.json | 20 ++-------- packages/pg-pubsub/package.json | 16 ++------ yarn.lock | 38 +------------------ 3 files changed, 8 insertions(+), 66 deletions(-) diff --git a/packages/jest-serializer-graphql-schema/package.json b/packages/jest-serializer-graphql-schema/package.json index 699761c35..7a23578b5 100644 --- a/packages/jest-serializer-graphql-schema/package.json +++ b/packages/jest-serializer-graphql-schema/package.json @@ -27,29 +27,17 @@ "graphql": "^14.5.8" }, "devDependencies": { - "@babel/core": "^7.6.4", - "@babel/preset-env": "^7.6.3", - "@babel/preset-typescript": "^7.6.0", "@types/node-fetch": "^2.5.2", - "babel-jest": "^24.9.0", "node-fetch": "^2.6.0", "pretty-format": "^24.9.0", + "ts-jest": "^24.1.0", "typescript": "^3.6.4" }, "files": [ "dist" ], - "babel": { - "presets": [ - [ - "@babel/preset-env", - { - "targets": { - "node": "current" - } - } - ], - "@babel/preset-typescript" - ] + "jest": { + "preset": "ts-jest", + "testEnvironment": "node" } } diff --git a/packages/pg-pubsub/package.json b/packages/pg-pubsub/package.json index d82706803..1dac4f969 100644 --- a/packages/pg-pubsub/package.json +++ b/packages/pg-pubsub/package.json @@ -48,28 +48,18 @@ "mock-res": "^0.5.0", "pg": "^7.10.0", "postgraphile": "^4.4.0", - "ts-jest": "^24.0.2", + "ts-jest": "^24.1.0", "typescript": "^3.4.5" }, "files": [ "dist" ], "jest": { - "moduleFileExtensions": [ - "ts", - "js", - "json" - ], - "roots": [ - "/src", - "/__tests__" - ], + "preset": "ts-jest", + "testEnvironment": "node", "snapshotSerializers": [ "jest-serializer-graphql-schema" ], - "transform": { - "^.+\\.tsx?$": "ts-jest" - }, "testRegex": "(/__tests__/.*\\.(test|spec))\\.[tj]sx?$" } } diff --git a/yarn.lock b/yarn.lock index 61b5c9416..25ff18665 100644 --- a/yarn.lock +++ b/yarn.lock @@ -80,18 +80,6 @@ "@babel/traverse" "^7.4.4" "@babel/types" "^7.4.4" -"@babel/helper-create-class-features-plugin@^7.6.0": - version "7.6.0" - resolved "https://registry.yarnpkg.com/@babel/helper-create-class-features-plugin/-/helper-create-class-features-plugin-7.6.0.tgz#769711acca889be371e9bc2eb68641d55218021f" - integrity sha512-O1QWBko4fzGju6VoVvrZg0RROCVifcLxiApnGP3OWfWzvxRZFCoBD81K5ur5e3bVY2Vf/5rIJm8cqPKn8HUJng== - dependencies: - "@babel/helper-function-name" "^7.1.0" - "@babel/helper-member-expression-to-functions" "^7.5.5" - "@babel/helper-optimise-call-expression" "^7.0.0" - "@babel/helper-plugin-utils" "^7.0.0" - "@babel/helper-replace-supers" "^7.5.5" - "@babel/helper-split-export-declaration" "^7.4.4" - "@babel/helper-define-map@^7.5.5": version "7.5.5" resolved "https://registry.yarnpkg.com/@babel/helper-define-map/-/helper-define-map-7.5.5.tgz#3dec32c2046f37e09b28c93eb0b103fd2a25d369" @@ -338,13 +326,6 @@ dependencies: "@babel/helper-plugin-utils" "^7.0.0" -"@babel/plugin-syntax-typescript@^7.2.0": - version "7.3.3" - resolved "https://registry.yarnpkg.com/@babel/plugin-syntax-typescript/-/plugin-syntax-typescript-7.3.3.tgz#a7cc3f66119a9f7ebe2de5383cce193473d65991" - integrity sha512-dGwbSMA1YhVS8+31CnPR7LB4pcbrzcV99wQzby4uAfrkZPYZlQ7ImwdpzLqi6Z6IL02b8IAL379CaMwo0x5Lag== - dependencies: - "@babel/helper-plugin-utils" "^7.0.0" - "@babel/plugin-transform-arrow-functions@^7.2.0": version "7.2.0" resolved "https://registry.yarnpkg.com/@babel/plugin-transform-arrow-functions/-/plugin-transform-arrow-functions-7.2.0.tgz#9aeafbe4d6ffc6563bf8f8372091628f00779550" @@ -600,15 +581,6 @@ dependencies: "@babel/helper-plugin-utils" "^7.0.0" -"@babel/plugin-transform-typescript@^7.6.0": - version "7.6.3" - resolved "https://registry.yarnpkg.com/@babel/plugin-transform-typescript/-/plugin-transform-typescript-7.6.3.tgz#dddb50cf3b8b2ef70b22e5326e9a91f05a1db13b" - integrity sha512-aiWINBrPMSC3xTXRNM/dfmyYuPNKY/aexYqBgh0HBI5Y+WO5oRAqW/oROYeYHrF4Zw12r9rK4fMk/ZlAmqx/FQ== - dependencies: - "@babel/helper-create-class-features-plugin" "^7.6.0" - "@babel/helper-plugin-utils" "^7.0.0" - "@babel/plugin-syntax-typescript" "^7.2.0" - "@babel/plugin-transform-unicode-regex@^7.6.2": version "7.6.2" resolved "https://registry.yarnpkg.com/@babel/plugin-transform-unicode-regex/-/plugin-transform-unicode-regex-7.6.2.tgz#b692aad888a7e8d8b1b214be6b9dc03d5031f698" @@ -682,14 +654,6 @@ "@babel/helper-plugin-utils" "^7.0.0" "@babel/plugin-transform-flow-strip-types" "^7.0.0" -"@babel/preset-typescript@^7.6.0": - version "7.6.0" - resolved "https://registry.yarnpkg.com/@babel/preset-typescript/-/preset-typescript-7.6.0.tgz#25768cb8830280baf47c45ab1a519a9977498c98" - integrity sha512-4xKw3tTcCm0qApyT6PqM9qniseCE79xGHiUnNdKGdxNsGUc2X7WwZybqIpnTmoukg3nhPceI5KPNzNqLNeIJww== - dependencies: - "@babel/helper-plugin-utils" "^7.0.0" - "@babel/plugin-transform-typescript" "^7.6.0" - "@babel/template@^7.1.0", "@babel/template@^7.4.0", "@babel/template@^7.4.4", "@babel/template@^7.6.0": version "7.6.0" resolved "https://registry.yarnpkg.com/@babel/template/-/template-7.6.0.tgz#7f0159c7f5012230dad64cca42ec9bdb5c9536e6" @@ -7867,7 +7831,7 @@ trim-off-newlines@^1.0.0: resolved "https://registry.yarnpkg.com/trim-off-newlines/-/trim-off-newlines-1.0.1.tgz#9f9ba9d9efa8764c387698bcbfeb2c848f11adb3" integrity sha1-n5up2e+odkw4dpi8v+sshI8RrbM= -ts-jest@24.1.0, ts-jest@^24.0.2: +ts-jest@24.1.0, ts-jest@^24.0.2, ts-jest@^24.1.0: version "24.1.0" resolved "https://registry.yarnpkg.com/ts-jest/-/ts-jest-24.1.0.tgz#2eaa813271a2987b7e6c3fefbda196301c131734" integrity sha512-HEGfrIEAZKfu1pkaxB9au17b1d9b56YZSqz5eCVE8mX68+5reOvlM93xGOzzCREIov9mdH7JBG+s0UyNAqr0tQ==