Skip to content

Improve Tests for CommonsCard and ProfitsTable to Pass Mutation Testing #55

@rranu

Description

@rranu

Currently mutation testing for the frontend results in 9 mutations consistently surviving. 2 of them relate to CommonsCard.js and the remaining 7 are from ProfitsTable.js. These files have not been changed in half-a-year or longer, so this is a legacy issue. Small improvements to the test-suites (as well as potentially fixing some Stryker disables) are in order.

  • Fix month comparison testing for CommonsCard.js for November and December due to the naive use of +2 to the current month
  • Either add stryker disable next-line BlockStatement: Unreasonable Mutation before line 17, or just take the following statement out of the else block (due to returns already leaving the function in other cases
  • Add tests for ProfitsTable.js which check that accessors aren't changed

Metadata

Metadata

Assignees

Labels

No labels
No labels

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions