Skip to content

Commit 3b2abdf

Browse files
committed
Add more tests for invalid files
1 parent 5f1629b commit 3b2abdf

File tree

1 file changed

+15
-1
lines changed

1 file changed

+15
-1
lines changed

test/test.js

Lines changed: 15 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,21 @@ test("get audio fingerprint", function(t) {
1818
});
1919

2020
test("bad file path", function(t) {
21-
fpcalc("bad/path", function(err, result) {
21+
fpcalc("bad/path", function(err) {
22+
t.ok(err);
23+
t.end();
24+
});
25+
});
26+
27+
test("no file path", function(t) {
28+
fpcalc(undefined, function(err) {
29+
t.ok(err);
30+
t.end();
31+
});
32+
});
33+
34+
test("non-audio file", function(t) {
35+
fpcalc(path.join(__dirname, "/../index.js"), function(err) {
2236
t.ok(err);
2337
t.end();
2438
});

0 commit comments

Comments
 (0)