mirror of
https://github.com/lovell/sharp.git
synced 2025-07-09 10:30:15 +02:00
Add test case for enlarge+embed combo #243
This commit is contained in:
parent
01435977de
commit
658a541f49
BIN
test/fixtures/expected/embed-enlarge.png
vendored
Normal file
BIN
test/fixtures/expected/embed-enlarge.png
vendored
Normal file
Binary file not shown.
After Width: | Height: | Size: 813 B |
@ -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);
|
||||||
|
});
|
||||||
|
});
|
||||||
|
|
||||||
});
|
});
|
||||||
|
Loading…
x
Reference in New Issue
Block a user