Reputation: 5414
I'm working on a project that recently implemented Rush. We're using Heft as a test runner, so the main test command is heft test
.
The problem is, no one knows how to only test one file. I tried using it with the --locale
flag as well as with the -t REGEXP
flag, but to no avail.
Any idea what the secret sauce is?
e.g.
src/apps/dashboard/components/Button/Button.test.tsx
# Jest syntax for testing one file / regexp except for heft
heft test -- button
Upvotes: 3
Views: 642
Reputation: 2700
Not sure which version of Heft you are using, but I do not have Heft installed globally, so I use npx
to use the version I have locally.
This works for me with heft 0.47.9
:
npx heft test --test-path-pattern src/path/to/my-test.test.ts
Upvotes: 1