Page MenuHomePhabricator

Add JavaScript unit tests for Charts
Closed, ResolvedPublic3 Estimated Story Points

Description

Background

As we build out the CLI tool for rendering graphs, it will be important to use tests for defining the specification of how it should behave. This is going to be essential if we ever need to make breaking changes to the spec or how we render charts.

User story

As a developer I want to be more confident in making changes to the CLI script.

Requirements

  • The repo has Jest tests.
  • The repo should define what the minimum expected test coverage is
  • There should be a test covering the generation of an SVG.

Event Timeline

Catrope triaged this task as Medium priority.Aug 1 2024, 6:03 PM
Catrope set the point value for this task to 3.

Change #1059161 had a related patch set uploaded (by Jdlrobson; author: Jdlrobson):

[mediawiki/extensions/Chart@master] Add Jest testing

https://gerrit.wikimedia.org/r/1059161

Change #1059161 abandoned by Jdlrobson:

[mediawiki/extensions/Chart@master] Add Jest testing

https://gerrit.wikimedia.org/r/1059161

Change #1059160 had a related patch set uploaded (by Jdlrobson; author: Jdlrobson):

[mediawiki/extensions/Chart@master] Add snapshot testing to Chart rendering

https://gerrit.wikimedia.org/r/1059160

Change #1059160 merged by jenkins-bot:

[mediawiki/extensions/Chart@master] Add snapshot testing to Chart rendering

https://gerrit.wikimedia.org/r/1059160