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

[BIOMAGE-999] Add unit tests for the gem2s API point #150

Merged
merged 8 commits into from
Jun 11, 2021
Merged

Conversation

robioson
Copy link
Contributor

@robioson robioson commented Jun 9, 2021

Background

Link to issue

https://biomage.atlassian.net/browse/BIOMAGE-999

Link to staging deployment URL

N/A

Links to any Pull Requests related to this

#109

Anything else the reviewers should know about the changes here

I initially based the tests on pipelines.test.js since the code for pipelines.js is very similar to that in gem2s.js. I then added tests to get 100% coverage for gem2s.js. It could be worthwhile coming back and doing the same for pipelines.js.

Changes

Code changes

  • Created tests/api/routes/gem2s.test.js
  • Added newly mocked function in src/api/route-services/__mocks__/experiment.js

Definition of DONE

Your changes will be ready for merging after each of the steps below have been completed:

Testing

  • Unit tests written
  • Tested locally with Inframock (with latest production data downloaded with biomage experiment pull)
  • Deployed to staging

To set up easy local testing with inframock, follow the instructions here: https://github.com/biomage-ltd/inframock
To deploy to the staging environment, follow the instructions here: https://github.com/biomage-ltd/biomage-utils

Documentation updates

Is all relevant documentation updated to reflect the proposed changes in this PR?

  • Relevant Github READMEs updated
  • Relevant wiki pages created/updated

Approvers

  • Approved by a member of the core engineering team
  • (UX changes) Approved by vickymorrison (this is her username, tag her if you need approval)

Just before merging:

Optional

  • Photo of a cute animal attached to this PR

image

@robioson robioson force-pushed the gem2s-test branch 2 times, most recently from 12ccddf to bb1ddae Compare June 9, 2021 17:00
@robioson robioson requested a review from kafkasl June 9, 2021 17:08
@robioson robioson marked this pull request as ready for review June 9, 2021 17:09
@robioson robioson marked this pull request as draft June 9, 2021 17:10
@robioson robioson requested a review from cosa65 June 10, 2021 10:43
@robioson robioson marked this pull request as ready for review June 10, 2021 10:43
@robioson robioson merged commit a0a84d1 into develop Jun 11, 2021
@robioson robioson deleted the gem2s-test branch June 11, 2021 20:02
ivababukova pushed a commit that referenced this pull request Jul 19, 2021
* Add gem2s.test.js (modelled on pipeline.test.js)

* Replace double with single quotes in spec

* Improve coverage

* Add test for invalid notification

* Add test for gem2s pipeline creation

* Reorder mocks

* Avoid using stringify unnecessarily

* Fix typos
alexvpickering pushed a commit that referenced this pull request Jun 12, 2023
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.

2 participants