Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add unit tests for db scripts #34

Merged
merged 7 commits into from Apr 4, 2022
Merged

Conversation

lauravuo
Copy link
Contributor

@lauravuo lauravuo commented Mar 29, 2022

Purpose

  • Add missing unit tests for db add and fetch scripts.
  • Include unit tests for scripts to coverage measurements.
  • Tests are run with firebase emulator.

Related Issues

Closes #24

How to test

See that CI passes or run locally:

yarn
yarn test:db

@codecov
Copy link

codecov bot commented Mar 29, 2022

Codecov Report

Merging #34 (f3e2cb6) into main (4a71a8e) will increase coverage by 1.23%.
The diff coverage is 100.00%.

@@            Coverage Diff             @@
##             main      #34      +/-   ##
==========================================
+ Coverage   97.77%   99.00%   +1.23%     
==========================================
  Files           7        8       +1     
  Lines          45      101      +56     
  Branches       11       19       +8     
==========================================
+ Hits           44      100      +56     
  Partials        1        1              
Flag Coverage Δ
db-unittests 100.00% <100.00%> (?)
ui-unittests 97.77% <ø> (?)

Flags with carried forward coverage won't be shown. Click here to find out more.

Impacted Files Coverage Δ
tools/firebase/db.ts 100.00% <100.00%> (ø)

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update b1b1ede...f3e2cb6. Read the comment docs.

@lauravuo lauravuo force-pushed the add-unit-tests-for-db-scripts branch from 96a66b2 to 761ff11 Compare March 31, 2022 18:40
@lauravuo lauravuo marked this pull request as ready for review March 31, 2022 18:48
Copy link
Collaborator

@eevajonnapanula eevajonnapanula left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looking good 🚀

@lauravuo lauravuo force-pushed the add-unit-tests-for-db-scripts branch from f46196b to ff8d24d Compare April 4, 2022 06:19
@lauravuo lauravuo force-pushed the add-unit-tests-for-db-scripts branch from ff8d24d to f3e2cb6 Compare April 4, 2022 06:24
@lauravuo lauravuo merged commit e285cff into main Apr 4, 2022
@lauravuo lauravuo deleted the add-unit-tests-for-db-scripts branch April 4, 2022 06:31
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Add unit tests for db scripts
2 participants