Expose control of the number of open files in libvips' cache.

Breaks API of existing cache method.
Disable libvips cache for I/O tests.
This commit is contained in:
Lovell Fuller
2016-01-06 20:37:37 +00:00
parent 8843211e12
commit 11329d5e09
29 changed files with 126 additions and 82 deletions

View File

@@ -6,9 +6,15 @@ var assert = require('assert');
var sharp = require('../../index');
var fixtures = require('../fixtures');
sharp.cache(0);
describe('Clone', function() {
before(function() {
sharp.cache(false);
});
after(function() {
sharp.cache(true);
});
it('Read from Stream and write to multiple Streams', function(done) {
var finishEventsExpected = 2;
// Output stream 1
@@ -55,4 +61,5 @@ describe('Clone', function() {
// Go
fs.createReadStream(fixtures.inputJpg).pipe(rotator);
});
});