debugger icon indicating copy to clipboard operation
debugger copied to clipboard

[CodeHealth] Improve our Test Coverage 🤡

Open wldcordeiro opened this issue 8 years ago • 21 comments

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
  • [ ] 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

wldcordeiro avatar Jan 13 '18 17:01 wldcordeiro

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!

jasonLaster avatar Jan 13 '18 19:01 jasonLaster

I'll work on scr/utils/frame!

jasonLaster avatar Jan 13 '18 20:01 jasonLaster

Working on src/utils/editor/

wldcordeiro avatar Jan 17 '18 17:01 wldcordeiro

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! 🎉

wldcordeiro avatar Jan 29 '18 05:01 wldcordeiro

Covered SourcesTree. Will work on Outline next 😀

mutdmour avatar Apr 22 '18 19:04 mutdmour

Will work on src/Components/ modules next

mutdmour avatar May 01 '18 16:05 mutdmour

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. 😃

adancarrasco avatar May 09 '18 02:05 adancarrasco

I will work on src/utils/ui.

adancarrasco avatar May 09 '18 03:05 adancarrasco

I will work on source-documents

mutdmour avatar Jun 03 '18 19:06 mutdmour

Can I work on tests for src/utils/editor/get-expression.js?

kenjiO avatar Jun 07 '18 19:06 kenjiO

@kenjiO go for it!

jasonLaster avatar Jun 11 '18 11:06 jasonLaster

Can I work on src/utils/fromJS?

marcogallo566 avatar Jun 26 '18 14:06 marcogallo566

@marcogallo566 we're using that file less and less, id recommend a different one

jasonLaster avatar Jun 26 '18 15:06 jasonLaster

Is src/utils/pause/scopes/getScope a good one?

marcogallo566 avatar Jun 26 '18 16:06 marcogallo566

yep

jasonLaster avatar Jun 26 '18 16:06 jasonLaster

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

mutdmour avatar Jun 27 '18 09:06 mutdmour

I'm happy to take on source-documents

connorholyday avatar Jul 25 '18 20:07 connorholyday

go for it.

jasonLaster avatar Jul 25 '18 20:07 jasonLaster

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 avatar Aug 11 '18 17:08 huoxito

@huoxito result-list would be great.

jasonLaster avatar Aug 13 '18 12:08 jasonLaster