I have a test \'works with nested children\' within the file fix-order-test.js.
Running the below runs all the tests in the file.
jest fix-order-test
./node_modules/.bin/jest --config test/jest-unit-config.json --runInBand src/components/OpenForm/OpenForm.spec.js -t 'show expanded'
./node_modules/.bin/...
is a wonderful way, to access the locally installed Jest (or Mocha or...) binary that came with the locally installed package. (Yes, in your npm scripts you can jest
with nothing before, but this is handy on command line... (that's also a good start for your debugging config, whichever IDE you are using...)package.json
), this is, what you need.-t
to not run all tests in that file, but only a single one (here: the one, that has something with ‘show expanded
’ in its name). Same effect can be achieved by glueing .only()
into that file.