Browse Source

Rename, add test for mono channel

Noah 8 years ago
parent
commit
318f6359d4
2 changed files with 14 additions and 0 deletions
  1. BIN
      test/data/short.wav
  2. 14 0
      test/probe-test.js

BIN
test/data/short.wav View File


test/duration-test.js → test/probe-test.js View File

@@ -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){