Add test case for enlarge+embed combo #243

This commit is contained in:
Lovell Fuller 2015-08-12 09:26:38 +01:00
parent 01435977de
commit 658a541f49
2 changed files with 14 additions and 0 deletions

BIN
test/fixtures/expected/embed-enlarge.png vendored Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 813 B

View File

@ -68,4 +68,18 @@ describe('Embed', function() {
});
});
it('Enlarge and embed', function(done) {
sharp(fixtures.inputPngWithOneColor)
.embed()
.resize(320, 240)
.toBuffer(function(err, data, info) {
if (err) throw err;
assert.strictEqual(true, data.length > 0);
assert.strictEqual('png', info.format);
assert.strictEqual(320, info.width);
assert.strictEqual(240, info.height);
fixtures.assertSimilar(fixtures.expected('embed-enlarge.png'), data, done);
});
});
});