Permalink
Browse files

cleaned up unit test for codec reporting

  • Loading branch information...
1 parent 29f4d51 commit e8daa12bcd84ef587449285b6ebd35b85520d9da @schaermu schaermu committed Mar 29, 2012
Showing with 6 additions and 12 deletions.
  1. +6 −12 test/conversion.test.js
View
@@ -205,7 +205,7 @@ module.exports = testCase({
});
},
testCodecDataNotification: function(test) {
- test.expect(5);
+ test.expect(2);
var testFile = __dirname + '/assets/testConvertToFile.flv';
var f = new ffmpeg({ source: this.testfile, nolog: true })
.onCodecData(function(codecinfo) {
@@ -214,17 +214,11 @@ module.exports = testCase({
.usingPreset('flashvideo')
.saveToFile(testFile, function(stdout, stderr, err) {
test.ok(!err);
- path.exists(testFile, function(exist) {
- test.ok(exist);
- // check filesize to make sure conversion actually worked
- fs.stat(testFile, function(err, stats) {
- test.ok(!err);
- test.ok(stats.size > 0);
- // unlink file
- fs.unlinkSync(testFile);
- test.done();
- });
- })
+ fs.stat(testFile, function(err, stats) {
+ // unlink file
+ fs.unlinkSync(testFile);
+ test.done();
+ });
});
}
});

0 comments on commit e8daa12

Please sign in to comment.