-
Notifications
You must be signed in to change notification settings - Fork 30
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Added support for passing a custom --testMatch
option to Jest
#338
Conversation
|
Performance Comparison ReportSignificant Changes To Render Duration
Show details
Meaningless Changes To Render DurationShow entries
Show details
Changes To Render CountThere are no entries Added ScenariosThere are no entries Removed ScenariosThere are no entries |
I would say, that it might be a good idea to wait until we merge the other CLI init PR so that we could improve on the warning log at the very least. It will have to be move to the new I'm happy to readjust as it's super minor in terms of changes, after the former PR will have been merged. |
Perhaps, we could use the same |
Yeah, I'd rather start with proxying |
That's absolutely fair @thymikee @mdjastrzebski. I'll revisit this one and think about a |
}) | ||
.option('testMatch', { | ||
alias: 'tm', | ||
type: 'string', |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It seems that Jest accepts an array of globs, could we support that as well. Yargs seems to support array type.
https://jestjs.io/docs/cli#--testmatch-glob1--globn
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yes, but we're currently using a single string so I went with the current pattern and added an improvement issue to actually properly update and optimise the glob that we're using as default. Please see #363
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I would like to make a separate PR to adjust that and also introduce the __perf__
directory as it would reflect the Jest defaults better.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I'm good with separate PR, let's not block this
@Xiltyn this looks simple and elegant. I've left some minor comments connected with matching Jest options slightly more closely. |
--file | -f
argument--testMatch
option to Jest
@mdjastrzebski @thymikee I updated the PR based on the suggestions. It's mainly a stylistic change since we've already been using the --testMatch option underneath anyway. It should be clearer now though. |
Needs rebase |
05d580d
to
39bc218
Compare
Done 👍 |
Summary
Resolves: #314
yarn reassure measure
and subsequently -yarn reassure
commands:--file | -f
Important
Using
TEST_RUNNER_ARGS
will override this feature as it works by adjusting thedefaultArgs
stringTest plan
yarn
yarn reassure -f "examples/native/src/OtherTest.perf-test.tsx"
Result: Only one test is ran
Demo
reassure-cli-single-file.mov