processing / processing/p5.js

Improve p5.Table.js unit tests

Open
#6,650 5 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Area:IO Enhancement Unit Testing
Dominant language
JavaScript
Stars
24k
Forks
3.8k
Avg merge
3d 16h
Merged PRs (30d)
25

Description

Increasing Access

Currently p5.Table.js has test suites only for loading a table in loadTable.js and saving a table saveTable.js . However, there are areas with missing test cases for eg: Modifying a table (addRow, removeRow, etc. ) or building a table from scratch which would increase the code coverage of p5.Table.js , indicated below:
codecoverage
p5.js uses mocha, mocha-chrome, chai.js assert, and expect for its unit tests.
There are separate files for different test suites, loadTable.js and saveTable.js
Maybe the modifyTable.js can be another file that can be added to the unit test or the modify table tests can be written in an existing file.

Most appropriate sub-area of p5.js?
  • Accessibility
  • Color
  • Core/Environment/Rendering
  • Data
  • DOM
  • Events
  • Image
  • IO
  • Math
  • Typography
  • Utilities
  • WebGL
  • Build Process
  • Unit Testing
  • Internalization
  • Friendly Errors
  • Other (specify if possible)
Feature enhancement details
  • Increasing the code coverage for p5.Table.js
  • writing new unit tests using mocha, chai.js, etc.
  • Tweaking into more test cases for correct format of values entered/modified in the table.

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start by reading p5.Table.js alongside the existing loadTable.js and saveTable.js test suites, then review the table operations mentioned in the issue, such as addRow and removeRow. Add unit tests for modifying and building tables, including value formats, and run the project’s Mocha-based tests to confirm the added cases pass and coverage improves.

Written by the indexing model from the issue text.

Assessment

Tech stack
javascript
Domain
testing
Issue type
Feature
Difficulty
3/5
Estimated time
1-2 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
38/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.