Skip to content

Instantly share code, notes, and snippets.

@simontraill
Created October 12, 2017 14:38
Show Gist options
  • Save simontraill/5d58e468249fc88e80d756a937acd1b9 to your computer and use it in GitHub Desktop.
Save simontraill/5d58e468249fc88e80d756a937acd1b9 to your computer and use it in GitHub Desktop.
partitions.js tests
var execSync = require('child_process').execSync;
var assert = require('assert');
var result = 'GOOD';
var results = {
'paritions': '{"sda":[8,0],"sda1":[8,1],"sda2":[8,2],"sda5":[8,5]}'
};
try {
for (var input of Object.keys(results)) {
assert.equal(results[input],execSync("node example.js").toString().trim());
}
} catch (e) {
result = 'BAD';
}
console.log(result);
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment