aboutsummaryrefslogtreecommitdiffstats
path: root/JSONSchema
diff options
context:
space:
mode:
authorJared Wasinger <j-wasinger@hotmail.com>2017-07-07 14:57:55 +0800
committerUbuntu <ubuntu@ip-172-31-32-43.us-west-2.compute.internal>2017-08-08 04:41:46 +0800
commit858d4c6c693580ef60247ddb24c7de8c2c66dc63 (patch)
tree56c5036736d615ff51037055d4af6c523e6beca5 /JSONSchema
parent53332daeef413c1a3684cd834cb5757234c8326d (diff)
downloaddexon-tests-858d4c6c693580ef60247ddb24c7de8c2c66dc63.tar
dexon-tests-858d4c6c693580ef60247ddb24c7de8c2c66dc63.tar.gz
dexon-tests-858d4c6c693580ef60247ddb24c7de8c2c66dc63.tar.bz2
dexon-tests-858d4c6c693580ef60247ddb24c7de8c2c66dc63.tar.lz
dexon-tests-858d4c6c693580ef60247ddb24c7de8c2c66dc63.tar.xz
dexon-tests-858d4c6c693580ef60247ddb24c7de8c2c66dc63.tar.zst
dexon-tests-858d4c6c693580ef60247ddb24c7de8c2c66dc63.zip
make log ordering consistent
Diffstat (limited to 'JSONSchema')
-rwxr-xr-xJSONSchema/validate.js11
1 files changed, 11 insertions, 0 deletions
diff --git a/JSONSchema/validate.js b/JSONSchema/validate.js
index 4c63500d0..1c176e2a8 100755
--- a/JSONSchema/validate.js
+++ b/JSONSchema/validate.js
@@ -25,6 +25,17 @@ rl.on('line', function(line) {
rl.on('close', function() {
schema = JSON.parse(fs.readFileSync('JSONSchema/schema.json'));
+ //sort file names alphabetically so that log output ordering is consistent
+ fileNames.sort((a,b) => {
+ if(a<b) {
+ return -1;
+ } else {
+ return 1;
+ }
+
+ return 0;
+ });
+
for (var i = 0; i < fileNames.length; i++) {
try {
testCode = JSON.parse(fs.readFileSync(fileNames[i]));