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

Updated parameterized test pattern #1379

Merged
merged 14 commits into from
Sep 19, 2023
Merged

Updated parameterized test pattern #1379

merged 14 commits into from
Sep 19, 2023

Conversation

rajsite
Copy link
Member

@rajsite rajsite commented Jul 23, 2023

Pull Request

🤨 Rationale

Updates the parametrized test pattern to address a few shortcomings in the previous pattern:

  • Avoids a lot of duplicated boilerplate
  • Doesn't encourage an approach that results in eslint disables being used often (false positive of await used in a loop)
  • Prevents accidentally focusing a test and checking it in
  • Gives decent typing, may take run-time to see if it needs improvements

👩‍💻 Implementation

Exposed new parameterization helpers named parameterize and parameterizeNamedList and marked the existing method deprecated.
Created a tech debt task to track migrating to the new pattern: #1551

🧪 Testing

Added some tests for the new helpers and migrated a couple of existing tests to the new pattern.

✅ Checklist

  • I have updated the project documentation to reflect my changes or determined no changes are needed. Added detailed comments to the helper like the deprecated helper did.

@rajsite rajsite disabled auto-merge July 25, 2023 00:00
@rajsite rajsite marked this pull request as draft July 25, 2023 00:00
@jattasNI jattasNI mentioned this pull request Jul 27, 2023
1 task
@rajsite rajsite marked this pull request as ready for review September 19, 2023 17:38
@rajsite rajsite enabled auto-merge (squash) September 19, 2023 17:40
@rajsite rajsite merged commit eadf3f2 into main Sep 19, 2023
10 checks passed
@rajsite rajsite deleted the parameterized-test-helper branch September 19, 2023 17:49
@rajsite
Copy link
Member Author

rajsite commented Sep 19, 2023

@jattasNI I meant to reset you since I changed the pattern 😅
If you have any concerns I can address them in a follow-up

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.

2 participants