-
Notifications
You must be signed in to change notification settings - Fork 355
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
fix(legacy-tooling): use the 'targets' argument to override usual test file path #3563
Conversation
@@ -11,9 +11,9 @@ const PATTERNS = { | |||
* Test directories for organizing test runners. | |||
*/ | |||
const TEST_DIRECTORIES = { | |||
INTEGRATION: './integration', |
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.
code looks good , need the intergation and coverage to be fixed
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.
These tests are fixed now.
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.
Looks good. Can we update the CONTRIBUTING also to mention how to use it?
@mkesavan13 If we add the
|
COMPLETES # NA
This pull request addresses
The inability to run test files separately. Currently, the
test:unit
ortest:integration
command collects all test files for a package and runs them even though we try mentioning the test file names using commands such as this:yarn workspace @webex/internal-plugin-dss test:unit -- test/unit/spec/dss.ts
Due to this, it is difficult to add
.only()
to tests and run them separately to troubleshoot problems.by making the following changes
The
run-tests
script takes an argumenttargets
which overrides the traditional test file collection.In this PR, I've enhanced the
Package
class to consider thetargets
argument and collect only the file that has been mentioned as a target. This ensures that the tooling runs only the tests we want them to.Change Type
The following scenarios where tested
yarn workspace @webex/internal-plugin-dss test:unit --targets dss.ts
I certified that
I have read and followed contributing guidelines
I discussed changes with code owners prior to submitting this pull request
I have not skipped any automated checks
All existing and new tests passed
I have updated the documentation accordingly
Make sure to have followed the contributing guidelines before submitting.