Open freaktechnik opened 7 years ago
The unit tests use ava, a modern test runner. To learn more about ava, visit its repo: https://github.com/avajs/ava
All the suggested unit tests are calls to the todo()
method on test
. To implement a test, remove the .todo
and add a function as the second argument that will run as test. You get an argument on which you can make assertions. There is always at least one test implemented in a file, so you have a rough reference of how ava works (and to satisfy eslint).
It seems that the github client can take the token
I've started _stubs.js as a collection for stubs of objects used within the application. New ones should probably be available via that module, but not necessarily defined within the module, depending on complexity.
Currently only very little functionality is tested. If there is already a test file some potential unit tests are marked using the
test.todo()
function.More generic things that need to be done for easier testing:
getRemainingChars()
andtweetTooLong()
on TwitterAccount [lib/twitter-account.js]