it('passes through two file through two streams', (done) => { const start = Date.now(); testStream('test', 'test2') .pipe(portal.start(twoStdConfig)) .pipe(assert.length(2)) .pipe(assert.any(compare.bind(null, 'test'))) .pipe(assert.any(compare.bind(null, 'test2'))) .pipe(assert.end((err) => { const estimated = Date.now() - start; expect(estimated).to.be.within(500, 1000); done(err); })); });
it('passes through two file through two streams with 1 concurrency', (done) => { const start = Date.now(); const curCfg = Object.assign({}, twoStdConfig, { maxParallel: 1, }); testStream('test', 'test2') .pipe(portal.start(curCfg)) .pipe(assert.length(2)) .pipe(assert.any(compare.bind(null, 'test'))) .pipe(assert.any(compare.bind(null, 'test2'))) .pipe(assert.end(() => { const estimated = Date.now() - start; expect(estimated).to.be.above(1000); done(); })); });