Skip to content

Commit

Permalink
Ensure web-stream is released after detection
Browse files Browse the repository at this point in the history
  • Loading branch information
Borewit committed Oct 13, 2024
1 parent 0e91f7b commit d66aac0
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 1 deletion.
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -220,7 +220,7 @@
],
"dependencies": {
"get-stream": "^9.0.1",
"strtok3": "^9.0.0",
"strtok3": "^9.0.1",
"token-types": "^6.0.0",
"uint8array-extras": "^1.3.0"
},
Expand Down
2 changes: 2 additions & 0 deletions test.js
Original file line number Diff line number Diff line change
Expand Up @@ -369,7 +369,9 @@ async function testStreamWithWebStream(t, ext, name) {
// Create a Blob from the buffer
const blob = new Blob([fileBuffer]);
const webStream = await fileTypeStream(blob.stream());
t.false(webStream.locked);
const webStreamResult = await getStreamAsUint8Array(webStream);
t.false(webStream.locked, 'Ensure web-stream is released');
t.true(areUint8ArraysEqual(fileBuffer, webStreamResult));
}

Expand Down

0 comments on commit d66aac0

Please sign in to comment.