Last change
on this file since 76712b2 was 6a3a178, checked in by Ema <ema_spirova@…>, 3 years ago |
initial commit
|
-
Property mode
set to
100644
|
File size:
609 bytes
|
Line | |
---|
1 | 'use strict'
|
---|
2 |
|
---|
3 | const tape = require('tape')
|
---|
4 | const { BufferList, BufferListStream } = require('../')
|
---|
5 | const { Buffer } = require('buffer')
|
---|
6 |
|
---|
7 | tape('convert from BufferList to BufferListStream', (t) => {
|
---|
8 | const data = Buffer.from(`TEST-${Date.now()}`)
|
---|
9 | const bl = new BufferList(data)
|
---|
10 | const bls = new BufferListStream(bl)
|
---|
11 | t.ok(bl.slice().equals(bls.slice()))
|
---|
12 | t.end()
|
---|
13 | })
|
---|
14 |
|
---|
15 | tape('convert from BufferListStream to BufferList', (t) => {
|
---|
16 | const data = Buffer.from(`TEST-${Date.now()}`)
|
---|
17 | const bls = new BufferListStream(data)
|
---|
18 | const bl = new BufferList(bls)
|
---|
19 | t.ok(bl.slice().equals(bls.slice()))
|
---|
20 | t.end()
|
---|
21 | })
|
---|
Note:
See
TracBrowser
for help on using the repository browser.