added flag for tests requiring lbc
This commit is contained in:
parent
07d0031f1c
commit
5ade0ec856
4 changed files with 8 additions and 2 deletions
|
@ -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
|
||||
|
|
|
@ -5,6 +5,7 @@
|
|||
"main": "speech.js",
|
||||
"scripts": {
|
||||
"test": "mocha --recursive",
|
||||
"test-all": "mocha --recursive",
|
||||
"start": "node speech.js",
|
||||
"lint": "eslint .",
|
||||
"fix": "eslint . --fix",
|
||||
|
|
|
@ -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')
|
||||
|
|
Before Width: | Height: | Size: 90 KiB After Width: | Height: | Size: 90 KiB |
Loading…
Reference in a new issue