diff options
author | Steve Thomas <Sc00bz@users.noreply.github.com> | 2015-11-01 14:36:28 -0600 |
---|---|---|
committer | Steve Thomas <Sc00bz@users.noreply.github.com> | 2015-11-01 14:36:28 -0600 |
commit | db7e40d449ab4ae65bacf267b38d1bf836b4fe54 (patch) | |
tree | f6f815673f56490c8ae3bfdc8ed9a5f4d9996f76 /test/run_tests_node.js | |
parent | 025908ef2b091faab75f60188654f789b691ff0d (diff) | |
parent | f9a2494fae0dcddef493de453aa6ab69caa987cf (diff) | |
download | sjcl-db7e40d449ab4ae65bacf267b38d1bf836b4fe54.zip sjcl-db7e40d449ab4ae65bacf267b38d1bf836b4fe54.tar.gz sjcl-db7e40d449ab4ae65bacf267b38d1bf836b4fe54.tar.bz2 |
Merge pull request #1 from bitwiseshiftleft/master
Update
Diffstat (limited to 'test/run_tests_node.js')
-rw-r--r-- | test/run_tests_node.js | 21 |
1 files changed, 21 insertions, 0 deletions
diff --git a/test/run_tests_node.js b/test/run_tests_node.js new file mode 100644 index 0000000..1475646 --- /dev/null +++ b/test/run_tests_node.js @@ -0,0 +1,21 @@ +var fs = require('fs'); +var vm = require('vm'); + +var load = function(path) { + try { + vm.runInThisContext(fs.readFileSync(path)); + } catch (e) { + console.log(path); + throw e; + } +}; + +// Assume we're run using `make test`. +// That means argv[0] is `node` and argv[1] is this file. +process.argv.slice(2).map(load); + +sjcl.test.run(undefined, function(){ + if(!browserUtil.allPassed) { + process.exit(1); + } +}); |