Skip to content

Commit 062884f

Browse files
committed
chore: added root jest config for native monorepo support
1 parent b58a12b commit 062884f

File tree

4 files changed

+33
-89
lines changed

4 files changed

+33
-89
lines changed

.gitignore

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,4 +17,5 @@ packages/core/validator/coverage
1717
packages/services/node-info/coverage
1818
.history
1919
.lh
20-
packages/core/repl/.vscode
20+
packages/core/repl/.vscode
21+
.idea

.idea/workspace.xml

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

jest.config.js

Lines changed: 30 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,30 @@
1+
const corePkg = require('./packages/core/core/package.json');
2+
const validatorPkg = require('./packages/core/validator/package.json');
3+
const utilsPkg = require('./packages/core/utils/package.json');
4+
const lockServicePkg = require('./packages/services/lock/package.json');
5+
6+
module.exports = {
7+
verbose: true,
8+
projects: [
9+
{
10+
testEnvironment: 'node',
11+
displayName: corePkg.name,
12+
testMatch: ['<rootDir>/packages/core/core/**/?(*.)+(spec|test).[jt]s?(x)']
13+
},
14+
{
15+
testEnvironment: 'node',
16+
displayName: validatorPkg.name,
17+
testMatch: ['<rootDir>/packages/core/validator/**/?(*.)+(spec|test).[jt]s?(x)']
18+
},
19+
{
20+
testEnvironment: 'node',
21+
displayName: utilsPkg.name,
22+
testMatch: ['<rootDir>/packages/core/utils/**/?(*.)+(spec|test).[jt]s?(x)']
23+
},
24+
{
25+
testEnvironment: 'node',
26+
displayName: lockServicePkg.name,
27+
testMatch: ['<rootDir>/packages/services/lock/**/?(*.)+(spec|test).[jt]s?(x)']
28+
}
29+
]
30+
};

package.json

Lines changed: 1 addition & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@
44
"postinstall": "lerna bootstrap --hoist",
55
"setup": "lerna bootstrap --hoist",
66
"link": "lerna link --force-local",
7-
"test": "lerna run test --stream",
7+
"test": "jest",
88
"audit": "lerna exec --concurrency 1 npm audit fix",
99
"lint": "concurrently \"lerna run lint --stream\" "
1010
},
@@ -53,7 +53,6 @@
5353
"bugs": {
5454
"url": "https://github.com/weave-microservices/weave/issues"
5555
},
56-
"homepage": "https://weave-js.com",
5756
"devDependencies": {
5857
"@sinonjs/fake-timers": "^9.1.1",
5958
"@types/jest": "^27.4.1",
@@ -63,8 +62,5 @@
6362
"eslint-config-fw": "^1.0.3",
6463
"jest": "^27.5.1",
6564
"jest-cli": "^27.5.1"
66-
},
67-
"jest": {
68-
"testEnvironment": "node"
6965
}
7066
}

0 commit comments

Comments
 (0)