@@ -177,7 +177,7 @@ const params = a.value.params.map(p => {
177177### 2. Inspect the process with node debug
178178
179179Here we are going to start the tests selectively in node debug mode. Since the
180- codemod is bootstrapped using [codemod-cli](https://github.com/rwjblue/codemod-cli) which is using [jest](https://jestjs.io/) in turn
180+ codemod is using [jest](https://jestjs.io/) in turn
181181to run the tests, jest is having an option ` - t < name- of - spec> ` to run a particular
182182set of tests instead of running the whole test suite.
183183
@@ -186,14 +186,24 @@ For more details on node debug, visit the [official](https://nodejs.org/en/docs/
186186Node.js debugging guide, and for jest documentation on tests, please refer [here](https://jestjs.io/docs/en/cli).
187187
188188` ` ` sh
189- node -- inspect- brk ./ node_modules/ .bin / codemod - cli - t ' <fixture -name>'
189+ node -- inspect- brk ./ node_modules/ .bin / jest -- runInBand -- testNamePattern < test - name>
190190` ` `
191191
192- For example, if you want to debug the ` null - subexp .input .hbs ` fixture or only that particular test case is failing
193- because of an issue.
192+ For example, if you want to debug the ` null - subexp` test or only that particular test case is failing because of an issue.
194193
195194` ` ` sh
196- node -- inspect- brk ./ node_modules/ .bin / codemod- cli - t ' null-subexp'
195+ node -- inspect- brk ./ node_modules/ .bin / jest -- runInBand -- testNamePattern ' null-subexp'
196+ ` ` `
197+
198+ Or you can make use of the npm scripts defined in package.json. All you need to pass the test name as the extra parameter with the script.
199+
200+ ` ` ` sh
201+ npm run debug: test ' null-subexp'
202+ ` ` `
203+
204+ Using yarn
205+ ` ` ` sh
206+ yarn debug: test ' null-subexp'
197207` ` `
198208
199209Once you run the above command, your tests will start running in debug mode and your breakpoints will be
0 commit comments