FACG5 / Later-team

0 stars 0 forks source link

Tests. #22

Open sultanassi95 opened 6 years ago

sultanassi95 commented 6 years ago

Hi,

Prove its working correctly, that's why we write tests. and to have a good test, we should be careful in choosing what we are testing for, also, the data we are going to test.

An important note, testing for a result that is coming back from an API request, should include:

In this snippet of code, also the other tests: https://github.com/FACG5/Later-team/blob/aaf09e86bb9ef670f8be49789e2e8d704cffb617/tests/test.js#L9

Consider the above note.

Also, you are using deepEqual to compare a string with another, it will work correctly, but, the CORRECT way to compare anything that is not an object, is by using equal(), but, to test the equality of two objects, we can safely do that with deepEqual()