Skip to content

Commit 558dfc7

Browse files
committed
Use substring instead of the deprecated string method substr in tests.
1 parent 500545b commit 558dfc7

File tree

2 files changed

+2
-1
lines changed

2 files changed

+2
-1
lines changed

changelog.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -28,6 +28,7 @@
2828
- Reorganized the test file structure.
2929
- Use the `.js` file extension in `require` paths.
3030
- Use the Node.js `Readable` property `readableEncoding` instead of `_readableState.encoding` in tests.
31+
- Use `substring` instead of the deprecated string method `substr` in tests.
3132
- Fixed a typo in a code comment.
3233
- Updated documentation.
3334
- Added a `license.md` MIT License file, closing [#86](https://github.com/jaydenseric/graphql-upload/issues/86).

test/abortingMultipartRequest.mjs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -44,7 +44,7 @@ export default async function abortingMultipartRequest(
4444
if (chunkAbortIndex !== -1) {
4545
if (chunkAbortIndex !== 0)
4646
// Yield the final truncated chunk before aborting.
47-
yield textEncoder.encode(chunkString.substr(0, chunkAbortIndex));
47+
yield textEncoder.encode(chunkString.substring(0, chunkAbortIndex));
4848

4949
// Abort the request after it has been received by the server request
5050
// handler, or else Node.js won’t run the handler.

0 commit comments

Comments
 (0)