Skip to content

Commit 7d14761

Browse files
committed
Make the tests Windows-compatible
Closes #207
1 parent b3ebead commit 7d14761

File tree

2 files changed

+3
-2
lines changed

2 files changed

+3
-2
lines changed

package.json

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -141,6 +141,7 @@
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",

test.js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,7 @@ import stream from 'stream';
44
import test from 'ava';
55
import readChunk from 'read-chunk';
66
import pify from 'pify';
7+
import {readableNoopStream} from 'noop-stream';
78
import fileType from '.';
89

910
const types = [
@@ -272,9 +273,8 @@ for (const type of types) {
272273
}
273274

274275
test('.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
/Expected the `input` argument to be of type `Uint8Array` /
279279
);
280280
});

0 commit comments

Comments
 (0)