A somewhat updated fork from GraphicsMagick for node
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 

40 lines
891 B

var assert = require('assert')
module.exports = function (gm, dir, finish, GM) {
if (!GM.integration)
return finish();
gm
.filesize(function getterfilesize (err, size) {
if (err) return finish(err);
if (this._options.imageMagick) {
assert.equal('7792B', size, size);
} else {
assert.ok(/7.6K[i]{0,1}/.test(size));
}
assert.equal(size, this.data.Filesize)
// make sure we are reading from the data cache and not
// hitting the fs again.
this.identify = function () {
assert.ok(false, 'Did not read from cache');
}
this.filesize(function (err, size) {
if (err) return finish(err);
if (this._options.imageMagick) {
assert.equal('7792B', size, size);
} else {
assert.ok(/7.6K[i]{0,1}/.test(size));
}
assert.equal(size, this.data.Filesize)
finish();
});
});
}