revert e5e2aca0c4
revert Merge branch 'main' of http://47.107.152.87:3000/liubiao/APP # Conflicts: # .gitignore # pages/common/index/index.vue # unpackage/dist/dev/app-plus/app-config-service.js # unpackage/dist/dev/app-plus/app-service.js # unpackage/dist/dev/app-plus/app-view.js # unpackage/dist/dev/app-plus/manifest.json # utils/request.js
This commit is contained in:
48
node_modules/stream-shift/test.js
generated
vendored
Normal file
48
node_modules/stream-shift/test.js
generated
vendored
Normal file
@ -0,0 +1,48 @@
|
||||
var tape = require('tape')
|
||||
var through = require('through2')
|
||||
var stream = require('stream')
|
||||
var shift = require('./')
|
||||
|
||||
tape('shifts next', function (t) {
|
||||
var passthrough = through()
|
||||
|
||||
passthrough.write('hello')
|
||||
passthrough.write('world')
|
||||
|
||||
t.same(shift(passthrough), Buffer.from('hello'))
|
||||
t.same(shift(passthrough), Buffer.from('world'))
|
||||
t.end()
|
||||
})
|
||||
|
||||
tape('shifts next with core', function (t) {
|
||||
var passthrough = stream.PassThrough()
|
||||
|
||||
passthrough.write('hello')
|
||||
passthrough.write('world')
|
||||
|
||||
t.same(shift(passthrough), Buffer.from('hello'))
|
||||
t.same(shift(passthrough), Buffer.from('world'))
|
||||
t.end()
|
||||
})
|
||||
|
||||
tape('shifts next with object mode', function (t) {
|
||||
var passthrough = through({objectMode: true})
|
||||
|
||||
passthrough.write({hello: 1})
|
||||
passthrough.write({world: 1})
|
||||
|
||||
t.same(shift(passthrough), {hello: 1})
|
||||
t.same(shift(passthrough), {world: 1})
|
||||
t.end()
|
||||
})
|
||||
|
||||
tape('shifts next with object mode with core', function (t) {
|
||||
var passthrough = stream.PassThrough({objectMode: true})
|
||||
|
||||
passthrough.write({hello: 1})
|
||||
passthrough.write({world: 1})
|
||||
|
||||
t.same(shift(passthrough), {hello: 1})
|
||||
t.same(shift(passthrough), {world: 1})
|
||||
t.end()
|
||||
})
|
Reference in New Issue
Block a user