File tree 2 files changed +10
-1
lines changed
2 files changed +10
-1
lines changed Original file line number Diff line number Diff line change @@ -23,7 +23,7 @@ class BlobDataItem {
23
23
constructor ( options ) {
24
24
this . size = options . size ;
25
25
this . path = options . path ;
26
- this . start = options . start ;
26
+ this . start = options . start || 0 ;
27
27
this . mtime = options . mtime ;
28
28
}
29
29
Original file line number Diff line number Diff line change @@ -163,6 +163,15 @@ test('Reading after modified should fail', async t => {
163
163
t . is ( error . name , 'NotReadableError' ) ;
164
164
} ) ;
165
165
166
+ test ( 'Reading from the stream created by blobFrom' , async t => {
167
+ const blob = blobFrom ( './LICENSE' ) ;
168
+ const expected = await fs . promises . readFile ( './LICENSE' , 'utf-8' ) ;
169
+
170
+ const actual = await getStream ( blob . stream ( ) ) ;
171
+
172
+ t . is ( actual , expected ) ;
173
+ } ) ;
174
+
166
175
test ( 'Blob-ish class is an instance of Blob' , t => {
167
176
class File {
168
177
stream ( ) { }
You can’t perform that action at this time.
0 commit comments