-
Notifications
You must be signed in to change notification settings - Fork 106
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
Conversation
creator-node/test/tracks.js
Outdated
.expect(400) | ||
}) | ||
|
||
it.only('downloads downloadable track with no track_id', async function () { |
There was a problem hiding this comment.
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
There was a problem hiding this 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!
creator-node/package.json
Outdated
@@ -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", |
There was a problem hiding this comment.
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
creator-node/.gitignore
Outdated
test_file_storage/ | ||
coverage/ |
There was a problem hiding this comment.
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?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
lgtm!
Added 2 unit tests to
creator_node/test/track.js
:track_id
andsource_id
is not present, service should throw and errordownload.is_downloadable: true, download.cid: <cid>
into metadata obj., a downloadable track should be created and return 200