• Home
  • Features
  • Pricing
  • Docs
  • Announcements
  • Sign In

CSCfi / metadata-submitter-frontend / 25420523274

06 May 2026 06:42AM UTC coverage: 55.111% (+0.03%) from 55.081%
25420523274

push

github

Steve Kemp
feature: Improve test cases with mocking (merge commit)

Merge branch 'feature/testing-config.json' into 'main'
* fix: Use 'const' instead of 'let'.

* Fixed typo in comment.

* Added more comments to the test.

* Feature: Test the API-prefix addition works

* feature: Improve test cases with mocking

This merge-request updates the application-config structure to add
a new propertly "FETCHED", storing the number of times the config
value(s) have been retrieved.

We then add a global mock to the vitest deployment, and update our
test-cases to ensure that:

* The /config.json file is loaded, and has the correct/expected result.
* Fetching multiple times increases the fetch-count.
  * (i.e. first.FETCHED < second.FETCHED).

See merge request https://gitlab.ci.csc.fi/sds-dev/sd-submit/metadata-submitter-frontend/-/merge_requests/1226

Reviewed-by: Liisa Lado-Villar <145-lilado@users.noreply.gitlab.ci.csc.fi>
Approved-by: Liisa Lado-Villar <145-lilado@users.noreply.gitlab.ci.csc.fi>
Co-authored-by: Steve Kemp <steve.kemp@sc.fi>
Merged by Steve Kemp <kempstev@csc.fi>

478 of 1074 branches covered (44.51%)

Branch coverage included in aggregate %.

1328 of 2203 relevant lines covered (60.28%)

8.26 hits per line

Source File
Press 'n' to go to next uncovered line, 'b' for previous

87.5
/src/utils/getConfig.ts


Source Not Available

STATUS · Troubleshooting · Open an Issue · Sales · Support · CAREERS · ENTERPRISE · START FREE · SCHEDULE DEMO
ANNOUNCEMENTS · TWITTER · TOS & SLA · Supported CI Services · What's a CI service? · Automated Testing

© 2026 Coveralls, Inc