hexo/node_modules/pause-stream/test/index.js

18 lines
434 B
JavaScript
Raw Normal View History

2023-10-03 11:14:36 +08:00
var spec = require('stream-spec')
var tester = require('stream-tester')
var ps = require('..')()
spec(ps)
.through({strict: false})
.validateOnExit()
var master = tester.createConsistent
tester.createRandomStream(1000) //1k random numbers
.pipe(master = tester.createConsistentStream())
.pipe(tester.createUnpauseStream())
.pipe(ps)
.pipe(tester.createPauseStream())
.pipe(master.createSlave())