diff --git a/CONTRIBUTING.md b/CONTRIBUTING.md index 66946080..6b6dbe20 100644 --- a/CONTRIBUTING.md +++ b/CONTRIBUTING.md @@ -93,6 +93,8 @@ You can build the docs e.g. produce html, using `make docs`. At some point in th ## Testing Front-end tests are found in the `tests/frontend/` folder in the repository. Run them by pointing your browser to `/tests/frontend`. +Back-end tests can be run from the `src` directory, via `npm test`. + ## Things you can help with Etherpad is much more than software. So if you aren't a developer then worry not, there is still a LOT you can do! A big part of what we do is community engagement. You can help in the following ways * Triage bugs (applying labels) and confirming their existance diff --git a/bin/backendTests.sh b/bin/backendTests.sh deleted file mode 100755 index ec12775b..00000000 --- a/bin/backendTests.sh +++ /dev/null @@ -1 +0,0 @@ -src/node_modules/mocha/bin/mocha --timeout 5000 --reporter nyan tests/backend/specs/api diff --git a/src/package.json b/src/package.json index b6691559..a1c0d416 100644 --- a/src/package.json +++ b/src/package.json @@ -74,6 +74,9 @@ "type": "git", "url": "http://github.com/ether/etherpad-lite.git" }, + "scripts": { + "test": "mocha --timeout 5000 --reporter nyan ../tests/backend/specs/api" + }, "version": "1.6.6", "license": "Apache-2.0" } diff --git a/tests/README.md b/tests/README.md index 55ae0ef8..6ab5dd23 100644 --- a/tests/README.md +++ b/tests/README.md @@ -8,4 +8,4 @@ To run the frontend tests, point your browser to `/tests/fronten ## Backend -To run the backend tests, run `bin/backendTests.sh` +To run the backend tests, run `cd src` and then `npm test`