Closed
Description
Version
v22.5.0
Platform
Linux penguin 6.6.32-02873-ge0e03a627715 #1 SMP PREEMPT Mon, 1 Jul 2024 20:29:42 +0000 aarch64 GNU/Linux
Subsystem
No response
What steps will reproduce the bug?
> await fs.promises.writeFile('a.txt', 'abcdefghij')
> blob = await fs.openAsBlob('a.txt')
Blob { size: 10, type: '' }
> await _.text()
'abcdefghij'
> blob.slice(3)
Blob { size: 7, type: '' }
> await _.text()
'defghij'
> blob.slice(3).slice()
Blob { size: 7, type: '' }
> await _.text()
'defg'
How often does it reproduce? Is there a required condition?
No response
What is the expected behavior? Why is that the expected behavior?
slice()
with no arguments should be equivalent to slice(0, length)
and return the entire blob; both of those are incorrectly returning something else.
What do you see instead?
The returned Blob
object purports to have the expected size
, but when it is read it has the wrong length.
Additional information
No response