Fix for the 'start' range of BlobDataItem when reading its stream (#85)
Set default value for 'start' option
This commit is contained in:
@@ -163,6 +163,15 @@ test('Reading after modified should fail', async t => {
|
||||
t.is(error.name, 'NotReadableError');
|
||||
});
|
||||
|
||||
test('Reading from the stream created by blobFrom', async t => {
|
||||
const blob = blobFrom('./LICENSE');
|
||||
const expected = await fs.promises.readFile('./LICENSE', 'utf-8');
|
||||
|
||||
const actual = await getStream(blob.stream());
|
||||
|
||||
t.is(actual, expected);
|
||||
});
|
||||
|
||||
test('Blob-ish class is an instance of Blob', t => {
|
||||
class File {
|
||||
stream() {}
|
||||
|
||||
Reference in New Issue
Block a user