StackGenVis: Alignment of Data, Algorithms, and Models for Stacking Ensemble Learning Using Performance Metrics
https://doi.org/10.1109/TVCG.2020.3030352
You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
38 lines
754 B
38 lines
754 B
4 years ago
|
var test = require('tape');
|
||
|
var resumer = require('../');
|
||
|
var concat = require('concat-stream');
|
||
|
|
||
|
test('implicit resume', function (t) {
|
||
|
t.plan(1);
|
||
|
|
||
|
var s = createStream();
|
||
|
s.pipe(concat(function (err, body) {
|
||
|
t.equal(body, 'beep boop\n');
|
||
|
}));
|
||
|
});
|
||
|
|
||
|
test('pause/resume', function (t) {
|
||
|
t.plan(2);
|
||
|
|
||
|
var s = createStream();
|
||
|
s.pause();
|
||
|
|
||
|
var paused = true;
|
||
|
setTimeout(function () {
|
||
|
paused = false;
|
||
|
s.resume();
|
||
|
}, 100);
|
||
|
|
||
|
s.pipe(concat(function (err, body) {
|
||
|
t.equal(paused, false);
|
||
|
t.equal(body, 'beep boop\n');
|
||
|
}));
|
||
|
});
|
||
|
|
||
|
function createStream () {
|
||
|
var stream = resumer();
|
||
|
stream.queue('beep boop\n');
|
||
|
stream.queue(null);
|
||
|
return stream;
|
||
|
}
|