-
Notifications
You must be signed in to change notification settings - Fork 8
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Updated parameterized test pattern (#1379)
# 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 - [x] 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.
- Loading branch information
Showing
5 changed files
with
438 additions
and
86 deletions.
There are no files selected for viewing
7 changes: 7 additions & 0 deletions
7
change/@ni-nimble-components-5528f3eb-a2ce-4e80-9df4-6ddb04f8b015.json
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,7 @@ | ||
{ | ||
"type": "none", | ||
"comment": "Parameterize test pattern", | ||
"packageName": "@ni/nimble-components", | ||
"email": "[email protected]", | ||
"dependentChangeType": "none" | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.