Add private maxColourDistance for functional tests

Switch MSE-based tests to use it

Remove experimental MSE-based compare API
This commit is contained in:
Lovell Fuller
2015-05-19 17:57:03 +01:00
parent ef8db1eebf
commit 8832ae0bf9
16 changed files with 172 additions and 446 deletions

View File

@@ -83,8 +83,12 @@ describe('Alpha transparency', function() {
.resize(2048, 1536)
.interpolateWith('bicubic')
.toFile(actual, function(err) {
if (err) throw err;
fixtures.assertEqual(actual, expected, done);
if (err) {
done(err);
} else {
fixtures.assertMaxColourDistance(actual, expected, 102);
done();
}
});
});
@@ -96,8 +100,12 @@ describe('Alpha transparency', function() {
.resize(1024, 768)
.interpolateWith('bicubic')
.toFile(actual, function(err) {
if (err) throw err;
fixtures.assertEqual(actual, expected, done);
if (err) {
done(err);
} else {
fixtures.assertMaxColourDistance(actual, expected, 102);
done();
}
});
});