USWDS - Dependencies: Add override for nwsapi#6249
Conversation
amyleadem
left a comment
There was a problem hiding this comment.
LGTM - Thanks for this fix @mahoneycm.
- Confirm that failing unit tests should pass
- Removing the responsive utility classes (like
desktop:grid-col-3) does allow the unit tests to pass without this override update. These grid classes are not part of the functionality being checked in the unit tests, so I'm concluding that these failures are not related to the test content.
- Removing the responsive utility classes (like
- Confirm that unit tests fail with
nwsapiv2.2.16 (most recent), 2.2.15, 2.2.14 - Confirm that tests pass with nwsapi` v2.2.13
Possible follow-up
We should create an issue to follow up and see if we can remove this override in the future.
There was a problem hiding this comment.
@mahoneycm LGTM, except I am not 100% sure if the "approach is appropriate." Seems to work as designed as far as I can tell, and will leave it to others to determine the "appropriateness" of the approach. :)
@amyleadem thanks for flagging this! I originally thought we needed these styles to get the big-footer accordions to display correctly but it looks like we don't! I opened #6250 to keep track of a longer-term solution if |
Summary
Added override for
nswsapi@2.2.13. Now, the nested dependency will not cause unit tests to fail.Breaking change
This is not a breaking change
Related issue
Closes #6242
Related pull requests
N/A
Preview link
Preview link →
Problem statement
nwsapirecently pushed out version2.2.16which unintentionally introduced breaking changes tojsdom. Despite not having thenwsapidependency and not updatingjsdomthis update is affecting our unit tests.Additional information in dperini/nwsapi#135
Solution
Override
nwsapiversion for our dependencies until another fix has been identified.Alternative solutions considered
:selector from our unit testsjsdomthat is unaffected by this changenwsapi@2.2.13as a dependencyMajor changes
Testing and review
Confirm CI tests are passing
Checkout this branch
Remove
node_modulesandpackage-lock.jsonfilesRun
npm installRun
npm run test:unitConfirm there are no installation or test errors
Run
npm ls nwsapiConfirm the only listing is a sub dependency of
jsdomConfirm the version listed is
2.2.13 overriddenTesting checklist