2017-04-19 21:15:28 +02:00
|
|
|
'use strict';
|
|
|
|
|
2017-06-21 19:02:52 +02:00
|
|
|
let ReadTarball = require('../../src/lib/storage/streams').ReadTarball;
|
2013-12-27 14:06:57 +01:00
|
|
|
|
|
|
|
describe('mystreams', function() {
|
2014-11-12 12:14:37 +01:00
|
|
|
it('should delay events', function(cb) {
|
2017-04-19 21:15:28 +02:00
|
|
|
let test = new ReadTarball();
|
|
|
|
test.abort();
|
2014-11-12 12:14:37 +01:00
|
|
|
setTimeout(function() {
|
|
|
|
test.abort = function() {
|
2017-04-19 21:15:28 +02:00
|
|
|
cb();
|
|
|
|
};
|
2014-11-12 12:14:37 +01:00
|
|
|
test.abort = function() {
|
2017-04-19 21:15:28 +02:00
|
|
|
throw Error('fail');
|
|
|
|
};
|
|
|
|
}, 10);
|
|
|
|
});
|
|
|
|
});
|
2013-12-27 14:06:57 +01:00
|
|
|
|