Comparing version 1.0.0 to 1.0.1
@@ -100,3 +100,3 @@ var childProcess = require('child_process'), | ||
JpegTran.prototype.destroy = function () { | ||
this.finished = true; | ||
this.hasEnded = true; | ||
if (this.jpegTranProcess) { | ||
@@ -103,0 +103,0 @@ this.jpegTranProcess.kill(); |
{ | ||
"name": "jpegtran", | ||
"version": "1.0.0", | ||
"version": "1.0.1", | ||
"description": "The jpegtran utility as a readable/writable stream", | ||
@@ -5,0 +5,0 @@ "main": "lib/JpegTran.js", |
@@ -94,2 +94,3 @@ /*global describe, it, __dirname, setTimeout*/ | ||
jpegTran.destroy(); | ||
sinon.spy(jpegTran, 'emit'); | ||
expect(jpegTranProcess.kill, 'to have calls satisfying', function () { | ||
@@ -100,2 +101,5 @@ jpegTranProcess.kill(); | ||
expect(jpegTran.bufferedChunks, 'to be falsy'); | ||
setTimeout(run(function () { | ||
expect(jpegTran.emit, 'to have calls satisfying', []); | ||
}), 10); | ||
} else { | ||
@@ -102,0 +106,0 @@ setTimeout(run(waitForJpegTranProcess), 0); |
184799
597