I have project compile js to js.
I wrote filename.js and compile to filename.out.js, and check manually filename.out.js, next time when I modify my compiler, I hope the output does not changed, if it changed show the diff.
function testFile(filename){
var code = fs.readFileSync(filename + '.js', 'utf-8');
var expect = fs.readFileSync(filename + '.out.js', 'utf-8');
assert.equal(pro.compile(code), expect);
}
['groups', 'steps', 'serial', 'parallel'].forEach(testFile);
Every time it said AssertionError, but should not be, and it can not give diffrent.