-
-
Notifications
You must be signed in to change notification settings - Fork 1.3k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
* Fix one unintentional possible breaking change & update readme * Update changelog more * Update CHANGELOG.md Co-Authored-By: Charmander <~@charmander.me> Co-authored-by: Charmander <~@charmander.me>
- Loading branch information
1 parent
19308f9
commit 0895460
Showing
3 changed files
with
30 additions
and
6 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,8 +1,26 @@ | ||
var assert = require('assert') | ||
var QueryStream = require('../') | ||
|
||
var stream = new QueryStream('SELECT NOW()', [], { | ||
batchSize: 88 | ||
}) | ||
describe('stream config options', () => { | ||
// this is mostly for backwards compatability. | ||
it('sets readable.highWaterMark based on batch size', () => { | ||
var stream = new QueryStream('SELECT NOW()', [], { | ||
batchSize: 88 | ||
}) | ||
assert.equal(stream._readableState.highWaterMark, 88) | ||
}) | ||
|
||
it('sets readable.highWaterMark based on highWaterMark config', () => { | ||
var stream = new QueryStream('SELECT NOW()', [], { | ||
highWaterMark: 88 | ||
}) | ||
|
||
assert.equal(stream._readableState.highWaterMark, 88) | ||
}) | ||
|
||
assert.equal(stream._readableState.highWaterMark, 88) | ||
it('defaults to 100 for highWaterMark', () => { | ||
var stream = new QueryStream('SELECT NOW()', []) | ||
|
||
assert.equal(stream._readableState.highWaterMark, 100) | ||
}) | ||
}) |