teachcode
teachcode copied to clipboard
Write unit tests
As of now, we're missing out on unit tests which is extremely important. We're using avajs as the test runner.
- [ ]
teachcode init
(@Ian-Yy) - [ ]
teachcode submit
- [ ]
teachcode fetchtask <key>
- [ ]
teachcode showkeys
- [ ]
teachcode showcommands
Hi @jamesgeorge007 , I would like to try writing unit test for this
@Ian-Yy sure, feel free to shoot up a PR :+1: First of all, pick up a command that you would like to work with.
@jamesgeorge007 I would like to do teachcode init first ya =)
Hi @jamesgeorge007 , I've went through the code in init.js and Ava documentation but I'm really confused on how should I begin writing a Unit Test for this teachcode init
. There's multiple parts that I don't know how to unit test such as inquire user to input their learning choice, name and Github username, on the creation/cloning of repository, and if the directories is already created.
Can you please provide some guide or how I should be actually writing the unit test for teachcode init
. Really sorry, I'm still quite beginner in writing Unit Test. :pray: