handsontable / handsontable/hyperformula

We're missing tests for EmptyStatistics

Open
#472 0 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Good First Issue Impact: Medium Tech Debt Tests Verified
Dominant language
TypeScript
Stars
2.8k
Forks
171
Avg merge
1d 22h
Merged PRs (30d)
7

Description

Description

EmptyStatistics class is used for production build by default:

https://github.com/handsontable/hyperformula/blob/4e0b0bd184117e67820382e61cc04b0d10a76727/src/BuildEngineFactory.ts#L44

But our tests are always using Statistics module:

https://github.com/handsontable/hyperformula/blob/4e0b0bd184117e67820382e61cc04b0d10a76727/test/_setupFiles/bootstrap.ts#L13-L20

We should close this functionality with a test or two, to ensure that we're not using stats in the default production build.

Statistics are not cleared, they are for debugging only and may be a memory leak if used for a longer time than a short debugging session.

Your environment
  • HyperFormula version: 0.1.2
  • Browser Name and version: Firefox
  • Operating System: OS X

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 with src/BuildEngineFactory.ts at the production statistics setup and compare it with test/_setupFiles/bootstrap.ts, which currently uses Statistics. Add one or two tests confirming the default production build uses EmptyStatistics rather than collecting statistics, then run the relevant test suite.

Written by the indexing model from the issue text.

Assessment

Tech stack
typescript
Domain
testing
Issue type
Feature
Difficulty
2/5
Estimated time
1-3 hours
Activity status
Stale
Clarity
Clearly specified
Newbie friendliness
50/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.