Join GitHub today
GitHub is home to over 28 million developers working together to host and review code, manage projects, and build software together.Sign up
Write unit tests #4
Following cases are tested manually. Need to write unit tests for auto-testing.
check session_test.js for more detail.
You can probably use mocha or jasmine framework to write unit tests. You'll need some library to make HTTP calls. You may use chai & chai-http for this purpose. You may find other good alternatives too but please discuss your tech stack before starting.
Have a look at session_test.js for the sample test. It sets up the server and starts it. Then there is some commented code written for jasmine to test the application. There is some code in chai and chai-http which is used to make a call to the server.
Instead of running the server, you can just test all the files in src folder for their functionality (pure unit tests).
Here are some tutorials which I found using google;
All the best