Commit b9697822 b96978220c79ca0538cf6686dd56ca5de04c335d by Vincent Peybernes

#8 Improve result test of election - add display matrix job

1 parent 6594f290
Pipeline #18 for b9697822 failed in 26 seconds
......@@ -4,6 +4,7 @@
var RelativePlacement = require('../../lib/relative-placement');
var data = require('./results_data.json');
var util = require('util');
var exitCode = 0;
console.log('############################');
console.log('# Details of result matrix #');
......@@ -37,6 +38,7 @@ data.forEach((testCase, num) => {
log.push(expected[place]);
log.push('\t|\t');
if(candidateName != expected[place]) exitCode = 1;
(candidateName != expected[place]) ? log.push('*') : log.push(' ');
log.push(candidateName);
log.push('\t');
......@@ -59,6 +61,8 @@ data.forEach((testCase, num) => {
console.log('');
});
process.exit(exitCode);
/**
* @param {TestData} testData
* @return {String[][]}
......