youtubeclone-backend icon indicating copy to clipboard operation
youtubeclone-backend copied to clipboard

API test support

Open bigbadbrad opened this issue 4 years ago • 5 comments

Does this repo have any test support? Something like:

npm run mocha

describe('UserModel', function(){

[...]

it('should list users', async () => {

cheers

bigbadbrad avatar Jan 27 '21 19:01 bigbadbrad

at the time, nope. I am going to rewrite this application soon. During this rewrite, I'll consider adding tests.

manikandanraji avatar Jan 30 '21 03:01 manikandanraji

That would be great. I'm sure you already have your preferred testing library, but I have learned a lot by using Frederic's mocha tests in his repo. It handles all of the JWT which is nice. And uses sequelize. https://github.com/FredericHeem/starhackit/tree/master/server cheers!

bigbadbrad avatar Jan 30 '21 04:01 bigbadbrad

thanks for the suggestions, I'll look into it

manikandanraji avatar Jan 30 '21 04:01 manikandanraji

Hi it's also really helpful to be able to seed a table with a json file. Sequelize supports this. Then when you "npm run mocha", the db tables are created, seeded, then API tested. I find this to be the best part of sequelize.

bigbadbrad avatar Feb 01 '21 01:02 bigbadbrad

@manikandanraji what all do you plan to change in the rewrite?

arunim2405 avatar Jun 24 '21 08:06 arunim2405