-
-
Save TooTallNate/ad7ce486dc328d8f32b7 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
var fs = require('fs'); | |
var path = require('path'); | |
var assert = require('assert'); | |
var Decoder = require('./').Decoder; | |
var fixtures = path.resolve(__dirname, 'test', 'fixtures'); | |
var fixture = path.resolve(fixtures, '320x240.ogv'); | |
var decoder = new Decoder(); | |
var input = fs.createReadStream(fixture); | |
var count = 0; | |
var expected = 2; | |
decoder.on('stream', function (stream) { | |
count++; | |
stream.resume(); | |
}); | |
decoder.on('finish', function () { | |
assert.equal(expected, count); | |
console.error('ALL GOOD!'); | |
}); | |
input.pipe(decoder); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment