From f3f4fdc4ac8256c82dd0eea646b361506781724f Mon Sep 17 00:00:00 2001 From: Alex Kocharin Date: Fri, 27 Dec 2013 17:06:57 +0400 Subject: [PATCH] tests --- test/unit/mystreams.js | 17 +++++++++++++++++ 1 file changed, 17 insertions(+) create mode 100644 test/unit/mystreams.js diff --git a/test/unit/mystreams.js b/test/unit/mystreams.js new file mode 100644 index 000000000..7105d894f --- /dev/null +++ b/test/unit/mystreams.js @@ -0,0 +1,17 @@ +var ReadTarball = require('../../lib/streams').ReadTarballStream + +describe('mystreams', function() { + it('should delay events', function(cb) { + var test = new ReadTarball() + test.abort() + setTimeout(function() { + test.abort = function() { + cb() + } + test.abort = function() { + throw new Error('fail') + } + }, 10) + }) +}) +