biocore / biocore/empress

Add JS tests covering more modules

Open
#142 0 comments 1 reaction 1 assignee Claimed by @kwcantrell View on GitHub
testing
Dominant language
JavaScript
Stars
56
Forks
32
PR merge metrics
No merged PRs in 30d

Description

Listing JS files currently in `empress/support_files/js/` and whether or not a `test-[filename].js` file already exists for the file:

- [x] `animation-panel-handler.js`
- [ ] `animator.js`
- [x] `biom-table.js`
- [x] `bp-tree.js`
- [x] `byte-array.js`
- [x] `camera.js`
- [ ] `canvas-events.js`
- [x] `colorer.js`
- [ ] `drawer.js`
- [x] `empress.js`
- [x] `legend.js`
- [x] `select-node-menu.js`
- [ ] `side-panel-handler.js`
- [x] `util.js`
- [x] `vector-ops.js`

I imagine we'd want to cover all or at least most of these files eventually. Adding tests for more complex modules that rely on page state (e.g. `empress.js`) may be tricky, but should be doable. (And on the other side of things, some files, e.g. `vector-ops.js`, hopefully shouldn't require much effort to test -- since they just expose utility functions that can be unit-tested in isolation.)

One more note, somewhat related: adding JS code coverage via CodeCov would also help make identifying untested portions of the code easier (I rely on digging through coverage a lot, esp when testing JS code). That being said, this might require us to use a different test runner than `qunit-puppeteer`, since I don't think that it currently outputs JS test coverage information.

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.