[CodeHealth] Improve our Test Coverage 🤡
This is a tracking issue for the test coverage push. The goal is to increase our test coverage 10-20% by targeting some lower hanging fruits. Let's see where we're at in a month!
Goal bump total coverage to ~57%
Stretch goal bump total coverage to ~67%
Areas of Interest
- [x]
src/Components/- [x] ShortcutsModal
- [x] QuickOpenModal
- [x] Welcomebox
- [ ]
src/components/PrimaryPanes- [ ] Outline
- [x] SourcesTree
- [x]
src/components/shared- [x]
Button/- [x] Close
- [x] CommandBarButton
- [x] PaneToggle
- [x] Accordion
- [x] Badge
- [x] BracketArrow
- [x] Dropdown
- [x] ManagedTree
- [x] Modal
- [x] Popover
- [x] PreviewFunction
- [x] ResultList
- [x] SearchInput
- [x] Svg
- [x]
- [ ]
src/utils/- [x] clipboard
- [x] expressions
- [x] frame (:lock: @jasonLaster )
- [x] fromJS
- [x] isMinified
- [x] path
- [ ] pause
- [ ] preview
- [ ] quick-open
- [x] result-list
- [ ] source-maps
- [ ] source-queue
- [x] source
- [x] ui
- [x] utils
- [x] wasm
- [ ]
src/utils/breakpoint/- [x] astBreakpointLocations
- [ ]
src/utils/editor/- [x] create-editor
- [x] getTokenLocation
- [x] index.js
- [x] source-editor
- [x] source-search
Here's the first PR https://github.com/devtools-html/debugger.html/pull/5097
It's a GREAT example for how to write jest unit tests!
I'll work on scr/utils/frame!
Working on src/utils/editor/
Updating the issue with adjusted goals as we had been measuring the coverage wrong and Jest was missing stuff. Lower percentage now. 🙁 Let's get this up there! 🎉
Covered SourcesTree. Will work on Outline next 😀
Will work on src/Components/ modules next
Hi, I'm planning to help on this task, just wondering if the list is up-to-date? I was planning to contribute to astBreakpointLocation test but I'm seeing it in the code from yesterday's cloned repo. 😃
I will work on src/utils/ui.
I will work on source-documents
Can I work on tests for src/utils/editor/get-expression.js?
@kenjiO go for it!
Can I work on src/utils/fromJS?
@marcogallo566 we're using that file less and less, id recommend a different one
Is src/utils/pause/scopes/getScope a good one?
yep
sorry, could not setup the project before for some reason and don't have time to take on source-documents anymore. if someone else wants to take it on
I'm happy to take on source-documents
go for it.
hey all any chance someone could check the items already implemented pls?
I was going through the list and I see spec files for all items in src/Components, src/components/PrimaryPanes. The src/utils/ list seems to be missing only result-list, source-maps, source-queue.
I want to give a try on result-list would that still make sense? See https://github.com/devtools-html/debugger.html/pull/6805
@huoxito result-list would be great.