-
Notifications
You must be signed in to change notification settings - Fork 194
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
Update live/watched test documentation and scripts #5467
Conversation
This impacts the `--watch` flag to the `gulp test` task
This can help abstract the `--watch` - `--live` change in updated `frontend-build` package `tests` task.
You can filter the tests which are run by running ``make test ARGS='--grep <pattern>'``, | ||
or ``yarn test --grep <pattern>``. Only test files matching the regex ``<pattern>`` will | ||
be executed. |
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 removed the make
variant here not because it's not true (we can add it back if so desired) but just because I'm trying to minimize complexity. The convention I'm going for here is to lean toward make
for full runs of things (e.g. make test
, make sure
) and yarn
for filtered runs. We can discuss this and tweak as desired.
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.
That's in fact how I usually do it. It seems like a sensible and intuitive approach.
Note: Other sections on the |
Codecov Report
@@ Coverage Diff @@
## main #5467 +/- ##
=======================================
Coverage 99.21% 99.21%
=======================================
Files 238 238
Lines 9388 9388
Branches 2237 2237
=======================================
Hits 9314 9314
Misses 74 74 📣 We’re building smart automated test selection to slash your CI/CD build times. Learn more |
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.
LGTM
You can filter the tests which are run by running ``make test ARGS='--grep <pattern>'``, | ||
or ``yarn test --grep <pattern>``. Only test files matching the regex ``<pattern>`` will | ||
be executed. |
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.
That's in fact how I usually do it. It seems like a sensible and intuitive approach.
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.
We plan to replace gulp in future, which will solve the problem with conflicting flag names more generally, but I'm approving this as a pragmatic solution in the interim.
This PR:
frontend-build
, which changes agulp
tests task option from--watch
to--live
(see Changetests
option from--watch
to--live
to avoid node conflict frontend-build#317 for reasoning)scripts
entry topackage.json
to abstract this flag change:test:watch
For reference, these commands will all run and watch tests as of these changes (in order of what I think of as most conventional and convenient to least):
yarn test:watch
gulp test --live
npm run test:watch
make test ARGS='--live'
Testing these changes
make docs
. This should build the updated RST docs with sphinx and open a webpage to http://127.0.0.1:8000/ with the documentation content.