Initial commit.

This commit is contained in:
Jonathan Cremin 2015-07-09 23:01:43 +01:00
commit b48a4e92e1
169 changed files with 7538 additions and 0 deletions

View file

@ -0,0 +1,16 @@
import fs from 'fs';
import path from 'path';
import assert from 'assert';
import tmp from 'tmp';
import resize from '../../lib/resize';
const file = fs.readFileSync(path.join(__dirname, '..', 'fixtures', 'utah-arches.jpg'));
describe('Image resizing', function() {
it('should resize an image', function*() {
const imageBuffer = yield resize(file, {height: 100, width: 100});
const tmpFile = tmp.tmpNameSync();
fs.writeFileSync(tmpFile + '.jpg', imageBuffer);
assert(tmpFile);
});
});