Skip to content

Commit

Permalink
Make the tests Windows-compatible
Browse files Browse the repository at this point in the history
Closes #207
  • Loading branch information
sindresorhus committed May 26, 2019
1 parent b3ebead commit 7d14761
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 2 deletions.
1 change: 1 addition & 0 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -141,6 +141,7 @@
"devDependencies": {
"@types/node": "^11.12.2",
"ava": "^1.4.1",
"noop-stream": "^0.1.0",
"pify": "^4.0.1",
"read-chunk": "^3.2.0",
"tsd": "^0.7.1",
Expand Down
4 changes: 2 additions & 2 deletions test.js
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@ import stream from 'stream';
import test from 'ava';
import readChunk from 'read-chunk';
import pify from 'pify';
import {readableNoopStream} from 'noop-stream';
import fileType from '.';

const types = [
Expand Down Expand Up @@ -272,9 +273,8 @@ for (const type of types) {
}

test('.stream() method - empty stream', async t => {
const emptyStream = fs.createReadStream('/dev/null');
await t.throwsAsync(
fileType.stream(emptyStream),
fileType.stream(readableNoopStream()),
/Expected the `input` argument to be of type `Uint8Array` /
);
});
Expand Down

0 comments on commit 7d14761

Please sign in to comment.