• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
1'use strict';
2
3require('../common');
4const assert = require('assert');
5const { Duplex } = require('stream');
6
7{
8  const d = new Duplex({
9    objectMode: true,
10    highWaterMark: 100
11  });
12
13  assert.strictEqual(d.writableObjectMode, true);
14  assert.strictEqual(d.writableHighWaterMark, 100);
15  assert.strictEqual(d.readableObjectMode, true);
16  assert.strictEqual(d.readableHighWaterMark, 100);
17}
18
19{
20  const d = new Duplex({
21    readableObjectMode: false,
22    readableHighWaterMark: 10,
23    writableObjectMode: true,
24    writableHighWaterMark: 100
25  });
26
27  assert.strictEqual(d.writableObjectMode, true);
28  assert.strictEqual(d.writableHighWaterMark, 100);
29  assert.strictEqual(d.readableObjectMode, false);
30  assert.strictEqual(d.readableHighWaterMark, 10);
31}
32