File tree Expand file tree Collapse file tree 2 files changed +3
-2
lines changed
Expand file tree Collapse file tree 2 files changed +3
-2
lines changed Original file line number Diff line number Diff line change 141141 "devDependencies" : {
142142 "@types/node" : " ^11.12.2" ,
143143 "ava" : " ^1.4.1" ,
144+ "noop-stream" : " ^0.1.0" ,
144145 "pify" : " ^4.0.1" ,
145146 "read-chunk" : " ^3.2.0" ,
146147 "tsd" : " ^0.7.1" ,
Original file line number Diff line number Diff line change @@ -4,6 +4,7 @@ import stream from 'stream';
44import test from 'ava' ;
55import readChunk from 'read-chunk' ;
66import pify from 'pify' ;
7+ import { readableNoopStream } from 'noop-stream' ;
78import fileType from '.' ;
89
910const types = [
@@ -272,9 +273,8 @@ for (const type of types) {
272273}
273274
274275test ( '.stream() method - empty stream' , async t => {
275- const emptyStream = fs . createReadStream ( '/dev/null' ) ;
276276 await t . throwsAsync (
277- fileType . stream ( emptyStream ) ,
277+ fileType . stream ( readableNoopStream ( ) ) ,
278278 / E x p e c t e d t h e ` i n p u t ` a r g u m e n t t o b e o f t y p e ` U i n t 8 A r r a y ` /
279279 ) ;
280280} ) ;
You can’t perform that action at this time.
0 commit comments