Fix the errors/warnings in the unit tests
- Dominant language
- TypeScript
- Stars
- 53
- Forks
- 63
- Avg merge
- 2d 4h
- Merged PRs (30d)
- 15
Description
## Summary
When running [unit tests](https://github.com/mi6/ic-ui-kit/actions/runs/13302632711/job/37147339392#step:14:28) there's lots of errors and warnings that come up even though they all eventually pass. It looks a bit unsightly so we should fix some of the issues to reduce the number of errors.
## 💬 Description
There seem to be a few issues that crop up within the actual component code e.g.
- @Prop() `` on `` is immutable but was modified from within the component
- The state/prop `` changed during "componentDidLoad()", this triggers extra re-renders, try to setup on "componentWillLoad()"
And some coming from the tests e.g.
- No `` specified for `` - prop required
There's also issues that aren't repeated across different components and are just specific to one test file.
We should look through and remove as many as possible (not sure it'll be possible to remove them all)
## Why do we need it?
Looks neater and gives us more confidence in our code/tests.
Contributor guide
Research direction
Start with the linked unit-test workflow and capture the errors and warnings produced by the tests. Trace each message to the component or test that emits it, then address the warnings that can be removed without changing behavior. Done means the unit tests still pass with fewer reported errors and warnings, although the issue does not define a precise target count.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- typescript
- Domain
- frontend, testing-qa
- Issue type
- Refactor
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Stale
- Clarity
- Needs clarification
- Newbie friendliness
- 28/100