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.
 
 
 
 
StackGenVis/frontend/node_modules/resumer/test/through.js

36 lines
733 B

var test = require('tape');
var resumer = require('../');
var concat = require('concat-stream');
test('through write/end', function (t) {
t.plan(2);
var s = createStream();
s.on('okok', function () {
t.ok(true);
});
s.pipe(concat(function (err, body) {
t.equal(body, 'BEGIN\nRAWR\nEND\n');
}));
setTimeout(function () {
s.end('rawr\n');
}, 50);
});
function createStream () {
var stream = resumer(write, end);
stream.queue('BEGIN\n');
return stream;
function write (x) {
this.queue(String(x).toUpperCase());
}
function end () {
this.emit('okok');
this.queue('END\n');
this.queue(null);
}
}