Sometimes, we want to run a single test using Jest.
In this article, we’ll look at how to run a single test using Jest.
How to run a single test using Jest?
To run a single test using Jest, we can run jest
with the -t
option.
For instance, we run:
jest -t 'order-test'
to run a test with the describe string set to 'order-test'
.
In general, the format of the command is
jest -t '<describeString> <itString>'
Conclusion
To run a single test using Jest, we can run jest
with the -t
option.