From b1a4c1b4ff619a40189ac53e8161b421c2ca1265 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?C=C3=A9line=20O=27Neil?= Date: Wed, 26 Apr 2017 16:54:33 -0700 Subject: [PATCH] Update instructions for running select API tests, in line with wiki instructions --- test/api/README.md | 11 ++++++----- 1 file changed, 6 insertions(+), 5 deletions(-) diff --git a/test/api/README.md b/test/api/README.md index 1f5c98abb3..faf7dea58e 100644 --- a/test/api/README.md +++ b/test/api/README.md @@ -38,19 +38,20 @@ One caveat. If you have a severe syntax error in your files, the tests may fail $ gulp test:api:safe ``` -If you'd like to run the tests individually and inspect the output from the server, in one pane you can run: +If you'd like to run selected tests and inspect the output from the server, in one pane you can run: ```bash $ gulp test:nodemon ``` -And run your tests in another pane: +Wait for it to get to `info: Connected with Mongoose` and then leave it running. Run your tests in another pane: ```bash -$ mocha path/to/file.js +# Run a single test +$ mocha test/SUBDIRECTORY/NAME_OF_TEST.js --require ./test/helpers/start-server -# Mark a test with the `.only` attribute -$ mocha +# Run all tests in a subdirectory +$ mocha test/SUBDIRECTORY --recursive --require ./test/helpers/start-server ``` ## Structure