[NDH-776] Fix Frontend Unit Test Warnings#374
Merged
spopelka-dsac merged 5 commits intomainfrom Feb 3, 2026
Merged
Conversation
spopelka-dsac
requested changes
Feb 2, 2026
Contributor
spopelka-dsac
left a comment
There was a problem hiding this comment.
Minor change to one test. I'm interested how you arrived at this approach vs. wrapping the render statements in act() as indicated in the error messages, but this approach works, too!
Collaborator
Author
@spopelka-dsac the warnings were caused because there was state changes after the component was unmounted so if we wrapped render in act(), we would still get the warning. mocking eliminates the async behavior that caused the state changes which actually solves the problem. a side effect is that we dont need to make that fetch anymore so we run tests faster (by like 5ms lol) |
This file contains hidden or 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
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Fix Frontend Unit Test Warnings
Jira Ticket #776
Problem
When running

make testlocally, The frontend unit tests outputs a number of errors and warnings.Solution
Pass in mock frontend settings when building unit tests so that we no longer need to make async calls.
Result
Warnings are all gone and all tests pass
Test Plan
make test