Skip to content

Commit

Permalink
Use the Readable property readableEncoding instead of `_readableS…
Browse files Browse the repository at this point in the history
…tate.encoding`.
  • Loading branch information
jaydenseric committed May 4, 2022
1 parent aff25c3 commit 8d23234
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 2 deletions.
1 change: 1 addition & 0 deletions changelog.md
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,7 @@
- Updated `actions/setup-node` to v3.
- Reorganized the test file structure.
- Use the `.js` file extension in `require` paths.
- Use the Node.js `Readable` property `readableEncoding` instead of `_readableState.encoding` in tests.
- Fixed a typo in a code comment.

## 13.0.0
Expand Down
4 changes: 2 additions & 2 deletions processRequest.test.mjs
Original file line number Diff line number Diff line change
Expand Up @@ -67,7 +67,7 @@ export default (tests) => {
const stream = upload.createReadStream();

ok(stream instanceof ReadStream);
strictEqual(stream._readableState.encoding, null);
strictEqual(stream.readableEncoding, null);
strictEqual(stream.readableHighWaterMark, 16384);
strictEqual(await streamToString(stream), "a");
} catch (error) {
Expand Down Expand Up @@ -120,7 +120,7 @@ export default (tests) => {
const stream = upload.createReadStream({ encoding, highWaterMark });

ok(stream instanceof ReadStream);
strictEqual(stream._readableState.encoding, encoding);
strictEqual(stream.readableEncoding, encoding);
strictEqual(stream.readableHighWaterMark, highWaterMark);
strictEqual(
await streamToString(stream),
Expand Down

0 comments on commit 8d23234

Please sign in to comment.