Skip to content

Fix faulty js unit tests

Svein Tore Koksrud Seljebotn requested to merge fix-faulty-js-unit-test into dev

Description

Closes issues: Related issues:

Two javascript unit tests had issues where errors would print to console, but the test itself would pass. This would make CI indicate that all is good, while the tests in fact were not up to date wrt code.

The two tests in question were related to late changes in the recent finalizeallele branch, and did not have any impact yet, but if not caught it could cause us missing regressions in the code in future.

The underlying issue is how xhr-mock is handling exceptions inside the mocked HTTP calls. I believe this has changed in different versions of xhr-mock (that it worked differently before), but I haven't checked in detail.

Notes to reviewer

xhr-mock is updated.

Only the two changed files are using xhr-mock.

Type of change

Application (affects UI or general functionality):

  • New feature
  • Bug fix
  • Improvement

Ops / admin / CI related only (not impacting users):

  • New feature
  • Bug fix
  • Improvement

Tests

General

  • Tests have been added that prove my fix is effective or that my feature works
  • Related tests have been modified/removed

Hypothesis testing:

  • Soak testing has been done
  • Distribution between positive / negative cases has been checked

Database

  • Includes changes to database schema
  • Includes necessary database migrations

Configuration

  • Includes changes to configuration
  • Includes configuration migration instructions in documentation

Merge checklist

  • Self-review of code performed
  • Feature review against specification (if applicable)
  • Need for documentation has been evaluated and, if necessary, updated
  • Code and implementation is reviewed by other core developer (all changes, inc. changes based on initial review)
Edited by Øyvind Evju

Merge request reports