Skip to content

Commit d546025

Browse files
committed
Fix Jest in CLI
1 parent 56d59f3 commit d546025

File tree

4 files changed

+14
-11
lines changed

4 files changed

+14
-11
lines changed

cli/jest.config.js

+7
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
module.exports = {
2+
rootDir: '.',
3+
testPathIgnorePatterns: ['node_modules', '<rootDir>/dist'],
4+
transform: {
5+
'^.+\\.jsx?$': 'babel-jest',
6+
},
7+
};

cli/package.json

+1
Original file line numberDiff line numberDiff line change
@@ -46,6 +46,7 @@
4646
"@babel/plugin-transform-runtime": "^7.0.0-beta.42",
4747
"@babel/preset-env": "^7.0.0-beta.42",
4848
"@babel/register": "^7.0.0-beta.42",
49+
"babel-core": "^7.0.0-0",
4950
"babel-jest": "^22.1.0",
5051
"dotenv-extended": "^2.0.1",
5152
"jest": "^22.1.1",

jest.config.js

+2-1
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,13 @@
11
module.exports = {
22
projects: [
33
// Projects having their own config
4+
"cli",
45
"node-packages/commons",
56
"services/webhook-handler",
67
// Everything else (specified in object notation to avoid Jest duplicate config error)
78
{
89
testMatch: [
9-
"<rootDir>/!(node-packages/commons/|services/webhook-handler/){**/__tests__/**/*.js?(x),**/?(*.)(spec|test).js?(x)}"
10+
"<rootDir>/!(cli|node-packages/commons/|services/webhook-handler/){**/__tests__/**/*.js?(x),**/?(*.)(spec|test).js?(x)}"
1011
],
1112
testPathIgnorePatterns: ["node_modules", "flow-typed"]
1213
}

yarn.lock

+4-10
Original file line numberDiff line numberDiff line change
@@ -1058,6 +1058,10 @@ babel-core@^6.0.0, babel-core@^6.26.0:
10581058
slash "^1.0.0"
10591059
source-map "^0.5.6"
10601060

1061+
babel-core@^7.0.0-0:
1062+
version "7.0.0-bridge.0"
1063+
resolved "https://registry.yarnpkg.com/babel-core/-/babel-core-7.0.0-bridge.0.tgz#95a492ddd90f9b4e9a4a1da14eb335b87b634ece"
1064+
10611065
babel-eslint@^8.2.1:
10621066
version "8.2.2"
10631067
resolved "https://registry.yarnpkg.com/babel-eslint/-/babel-eslint-8.2.2.tgz#1102273354c6f0b29b4ea28a65f97d122296b68b"
@@ -1162,16 +1166,6 @@ [email protected], babel-runtime@^6.22.0, babel-runtime@^6.23.0, babel-runtime
11621166
core-js "^2.4.0"
11631167
regenerator-runtime "^0.11.0"
11641168

1165-
1166-
version "7.0.0-beta.3"
1167-
resolved "https://registry.yarnpkg.com/babel-template/-/babel-template-7.0.0-beta.3.tgz#ebb877b6070ce9912b0d0c22fcad3372165913a8"
1168-
dependencies:
1169-
babel-code-frame "7.0.0-beta.3"
1170-
babel-traverse "7.0.0-beta.3"
1171-
babel-types "7.0.0-beta.3"
1172-
babylon "7.0.0-beta.27"
1173-
lodash "^4.2.0"
1174-
11751169
babel-template@^6.16.0, babel-template@^6.24.1, babel-template@^6.26.0:
11761170
version "6.26.0"
11771171
resolved "https://registry.yarnpkg.com/babel-template/-/babel-template-6.26.0.tgz#de03e2d16396b069f46dd9fff8521fb1a0e35e02"

0 commit comments

Comments
 (0)