diff --git a/README.md b/README.md index 5669b79c..14b3f048 100644 --- a/README.md +++ b/README.md @@ -21,6 +21,11 @@ spee.ch is a single-serving site that reads and publishes images and videos to a * To run hot, use `nodemon` instead of `node` * visit [localhost:3000](http://localhost:3000) +## Tests +* Spee.ch uses `mocha` with `chai` for testing. +* To run all tests that do not require LBC, run `npm test -- --grep @usesLbc --invert` +* To run all tests, including those that require LBC (like publishing), simply run `npm test` + ## API #### GET diff --git a/package.json b/package.json index 27c23f39..3a326898 100644 --- a/package.json +++ b/package.json @@ -5,6 +5,7 @@ "main": "speech.js", "scripts": { "test": "mocha --recursive", + "test-all": "mocha --recursive", "start": "node speech.js", "lint": "eslint .", "fix": "eslint . --fix", diff --git a/test/end-to-end/end-to-end.tests.js b/test/end-to-end/end-to-end.tests.js index 5a016d10..d26d5853 100644 --- a/test/end-to-end/end-to-end.tests.js +++ b/test/end-to-end/end-to-end.tests.js @@ -86,11 +86,11 @@ describe('end-to-end', function () { const publishUrl = '/api/claim-publish'; const date = new Date(); const name = `test-publish-${date.getFullYear()}-${date.getMonth()}-${date.getDate()}-${date.getTime()}`; - const filePath = './test/mock-files/bird.jpeg'; + const filePath = './test/mock-data/bird.jpeg'; const fileName = 'byrd.jpeg'; describe(publishUrl, function () { - it(`should receive a status code 200 within ${publishTimeout}ms`, function (done) { + it(`should receive a status code 200 within ${publishTimeout}ms @usesLbc`, function (done) { chai.request(host) .post(publishUrl) .type('form') diff --git a/test/mock-files/bird.jpeg b/test/mock-data/bird.jpeg similarity index 100% rename from test/mock-files/bird.jpeg rename to test/mock-data/bird.jpeg