Add further test case for #387, which builds on 25b63a2

This commit is contained in:
Lovell Fuller
2016-03-30 19:26:19 +01:00
parent 25b63a2fb4
commit 24fb0c33c2
3 changed files with 32 additions and 7 deletions

View File

@@ -49,7 +49,24 @@ describe('Rotation', function() {
assert.strictEqual(240, metadata.height);
done();
});
});
});
});
it('Rotate by 270 degrees, rectangular output ignoring aspect ratio', function(done) {
sharp(fixtures.inputJpg)
.resize(320, 240)
.ignoreAspectRatio()
.rotate(270)
.toBuffer(function(err, data, info) {
if (err) throw err;
assert.strictEqual(320, info.width);
assert.strictEqual(240, info.height);
sharp(data).metadata(function(err, metadata) {
assert.strictEqual(320, metadata.width);
assert.strictEqual(240, metadata.height);
done();
});
});
});
it('Input image has Orientation EXIF tag but do not rotate output', function(done) {