Skip to content
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

Reconfigure Test Command #1898

Merged
merged 70 commits into from Mar 29, 2024
Merged

Reconfigure Test Command #1898

merged 70 commits into from Mar 29, 2024

Conversation

AdamMeza-Bentley
Copy link
Contributor

@AdamMeza-Bentley AdamMeza-Bentley commented Mar 5, 2024

Changes

Running each test for any one given component took longer than desired and required four long commands, two of which needed to be run in particular folders. This PR solves that problem by reconfiguring the test command. Now test will serve three use cases:

  • test still runs all tests
  • test --filter=[filter] runs specific tests when a --filter is found in the arguments 
  • test [compName] e.g. pnpm test Alert will run all tests for the Alert Component

Quirks/Issues

Due to our use of concurrently all processes must be aborted individually. This is an issue that was recently addressed. Not sure when/how we can use this update. I opted not to update any dependencies to keep the scope of this PR relatively small.

Testing

I've tested these changes by running test on a number of components. I made sure to test working and broken tests to ensure that errors are caught when thrown.

Docs

I've added a section on this command inside of CONTRIBUTING.md to demonstrate use.

@AdamMeza-Bentley AdamMeza-Bentley changed the title Test All Command Set Up Test Specific Command Set Up Mar 6, 2024
@AdamMeza-Bentley AdamMeza-Bentley marked this pull request as ready for review March 7, 2024 15:41
@AdamMeza-Bentley AdamMeza-Bentley requested review from a team as code owners March 7, 2024 15:41
@AdamMeza-Bentley AdamMeza-Bentley requested review from rohan-kadkol and Ben-Pusey-Bentley and removed request for a team March 7, 2024 15:41
@AdamMeza-Bentley
Copy link
Contributor Author

All functionality is working on my machine, as well as in the dev container.

@AdamMeza-Bentley AdamMeza-Bentley marked this pull request as ready for review March 27, 2024 12:35
scripts/runTests.mjs Show resolved Hide resolved
scripts/runTests.mjs Outdated Show resolved Hide resolved
Copy link
Contributor

@mayank99 mayank99 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM! I would wait for another approval though

CONTRIBUTING.md Outdated Show resolved Hide resolved
CONTRIBUTING.md Outdated Show resolved Hide resolved
Copy link
Contributor

@Ben-Pusey-Bentley Ben-Pusey-Bentley left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM.

package.json Outdated Show resolved Hide resolved
CONTRIBUTING.md Outdated Show resolved Hide resolved
package.json Outdated Show resolved Hide resolved
CONTRIBUTING.md Outdated Show resolved Hide resolved
@AdamMeza-Bentley AdamMeza-Bentley merged commit 2ef6aee into main Mar 29, 2024
16 checks passed
@AdamMeza-Bentley AdamMeza-Bentley deleted the Adam-Meza/test-all-config branch March 29, 2024 19:49
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

4 participants