@@ -84,21 +84,47 @@ yarn --version
84
84
85
85
If not, please refer to [ yarn installation] ( https://yarnpkg.com/en/docs/install ) to install ` yarn ` .
86
86
87
- To install the dependencies and link the library, run the following command:
87
+ To install the dependencies and link the library, run the following command under project root :
88
88
89
89
```
90
90
yarn
91
91
```
92
92
93
- To run all of the tests in the repository, still from the root package, run the following command:
93
+ To run all of the tests in the repository, still from the root package, run the following command
94
+ under project root:
94
95
95
96
```
96
97
yarn test:all
97
98
```
98
99
99
- The above command will use Lerna to run the ` test ` script in every package in the ` packages ` directory .
100
+ The above command will use Lerna to run the ` test ` script in every package of the monorepo .
100
101
101
- To run the tests for a specific package, you can run ` yarn test ` from within the specified package folder, assuming the above steps have been run.
102
+ #### Test a changed package
103
+
104
+ To run the tests for a specific package, you can run ` yarn test ` within the
105
+ specified package folder.
106
+
107
+ Alternatively, from the project root, you can run:
108
+
109
+ ```
110
+ lerna run test --scope [package name]
111
+ ```
112
+
113
+ If ` lerna ` is not available in your environment, you can install it globally with:
114
+
115
+ ```
116
+ npm install -g lerna
117
+ ```
118
+
119
+ If you have touched multiple packages and you want to make sure the package
120
+ you want to test has picked up all your latest changes in dependencies, you
121
+ can build them in one command:
122
+
123
+ ```
124
+ lerna run build --scope [package name] --include-dependencies
125
+ ```
126
+
127
+ You don't need to run this command if the dependency packages are not changed.
102
128
103
129
### Generating Service Clients
104
130
0 commit comments