diff options
-rw-r--r-- | test/javascript/cli_runner.js | 23 |
1 files changed, 15 insertions, 8 deletions
diff --git a/test/javascript/cli_runner.js b/test/javascript/cli_runner.js index 73467626b..a35348f20 100644 --- a/test/javascript/cli_runner.js +++ b/test/javascript/cli_runner.js @@ -12,6 +12,19 @@ // /* + * Quit current test execution if it is tagged as skipped or ported to elixir + */ +function quitIfSkippedOrPorted() { + if(couchTests.skip) { + quit(2); + } + + if(couchTests.elixir) { + quit(3); + } +} + +/* * Futon test suite was designed to be able to run all tests populated into * couchTests. Here we should only be loading one test, so we'll pop the first * test off the list and run the test. If more than one item is loaded in the @@ -22,14 +35,6 @@ function runTest() { var count = 0; var start = new Date().getTime(); - if(couchTests.skip) { - quit(2); - } - - if(couchTests.elixir) { - quit(3); - } - for(var name in couchTests) { count++; } @@ -51,6 +56,8 @@ function runTest() { } } +quitIfSkippedOrPorted(); + waitForSuccess(CouchDB.isRunning, 'isRunning'); runTest(); |