Current Project: wordapi.net. Today I wrote some more API tests. I validated the data being requested by the /api/list route which expects either one of the following parameters: length prefix suffix The test checks for a 500 status when none of the parameters have been entered: it('should send a 500...
Read More...Current Project: wordapi.net. I decided that I wanted my tests to automatically run every time I changed a test file. I could do this using the watch flag inside my package.json file: "scripts": { "test": "NODE_ENV=test mocha --compilers js:babel-core/register -w" } However, each time I changed a file, I was...
Read More...Current Project: wordapi.net. On Day 15, I’d successfully wrote some tests with Supertest, Mocha and Chai. My plan for today was to start writing more tests. However, I realised that it probably wouldn’t be wise to keep all tests in one file. It could become a nightmare to maintain as...
Read More...