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

unit tests for creator-node/src/routes/track.js #286

Merged
merged 4 commits into from
Feb 10, 2020
Merged

Conversation

vicky-g
Copy link
Contributor

@vicky-g vicky-g commented Feb 7, 2020

Added 2 unit tests to creator_node/test/track.js:

  • if track_id and source_id is not present, service should throw and error
  • when passing in download.is_downloadable: true, download.cid: <cid> into metadata obj., a downloadable track should be created and return 200

.expect(400)
})

it.only('downloads downloadable track with no track_id', async function () {
Copy link
Contributor

Choose a reason for hiding this comment

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

not a "download", just a metadata submission

@vicky-g vicky-g changed the title DO NOT MERGE addition to test/track.js addition to test/track.js Feb 10, 2020
@vicky-g vicky-g changed the title addition to test/track.js unit tests for creator-node/src/routes/track.js Feb 10, 2020
Copy link
Contributor

@SidSethi SidSethi left a comment

Choose a reason for hiding this comment

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

this is fantastic, couple small things and i'll approve!

@@ -5,6 +5,8 @@
"scripts": {
"start": "nodemon src/index.js | ./node_modules/.bin/bunyan || exit 0",
"test": "./scripts/run-tests.sh",
"coverage": "nyc npm run test",
"report": "nyc report --reporter=html",
Copy link
Contributor

Choose a reason for hiding this comment

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

would be good to add a comment somewhere about what purpose these commands serve

test_file_storage/
coverage/
Copy link
Contributor

Choose a reason for hiding this comment

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

looks like nyc generates a .nyc_output/ dir as well, lets add that here?

Copy link
Contributor

@SidSethi SidSethi left a comment

Choose a reason for hiding this comment

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

lgtm!

@vicky-g vicky-g merged commit 42203e6 into master Feb 10, 2020
@vicky-g vicky-g deleted the vg-creator-node branch February 10, 2020 23:10
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.

None yet

2 participants