source: trip-planner-front/node_modules/bl/test/convert.js@ 571e0df

Last change on this file since 571e0df 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
3const tape = require('tape')
4const { BufferList, BufferListStream } = require('../')
5const { Buffer } = require('buffer')
6
7tape('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
15tape('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.