summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorSolly Ross <sross@redhat.com>2014-09-15 16:44:36 -0400
committerSolly Ross <sross@redhat.com>2014-09-15 16:44:36 -0400
commit91127741bea2238277a426a382fec3740103d606 (patch)
treedf0fb46dffd3c8f71223d5f60050a6aaaaab9c3a
parent960752ea5308ea5aacd5a350b2ad45dcf999a608 (diff)
downloadnovnc-91127741bea2238277a426a382fec3740103d606.tar.gz
Support running all tests from the root directory
Previously, if you did not specify a tests file, you had to be in the 'tests' directory for the "run all tests" functionality to work. Now it will work in any directory.
-rwxr-xr-xtests/run_from_console.js1
1 files changed, 1 insertions, 0 deletions
diff --git a/tests/run_from_console.js b/tests/run_from_console.js
index 84ebd10..0d4cc8f 100755
--- a/tests/run_from_console.js
+++ b/tests/run_from_console.js
@@ -23,6 +23,7 @@ program
if (program.tests.length === 0) {
program.tests = fs.readdirSync(__dirname).filter(function(f) { return (/^test\.(\w|\.|-)+\.js$/).test(f); });
+ program.tests = program.tests.map(function (f) { return path.resolve(__dirname, f); }); // add full paths in
console.log('using files %s', program.tests);
}