|
@@ -36,6 +36,20 @@ tape("WAV probe", function(test) {
|
36
|
36
|
|
37
|
37
|
});
|
38
|
38
|
|
|
39
|
+tape("Mono probe", function(test) {
|
|
40
|
+
|
|
41
|
+ probe(path.join(__dirname, "data/short.wav"), function(err, data){
|
|
42
|
+
|
|
43
|
+ test.error(err);
|
|
44
|
+ test.equal(typeof data.duration, "number");
|
|
45
|
+ test.equal(data.channels, 1);
|
|
46
|
+ test.assert(Math.abs(data.duration - 0.01) < 0.01);
|
|
47
|
+ test.end();
|
|
48
|
+
|
|
49
|
+ });
|
|
50
|
+
|
|
51
|
+});
|
|
52
|
+
|
39
|
53
|
tape("Probe error", function(test) {
|
40
|
54
|
|
41
|
55
|
probe(path.join(__dirname, "..", "README.md"), function(err){
|