File size: 949 Bytes
5fae594 |
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 |
var fs = require('fs')
, clarinet = require('../clarinet.js')
, npm_stream = clarinet.createStream()
, twitter_stream = clarinet.createStream()
, assert = require('assert')
;
describe('clarinet', function(){
describe('#npm', function() {
it('should be able to parse npm', function (done){
npm_stream.on("error", function (err) { done(err); });
npm_stream.on("end", function () {
assert.ok(true, "npm worked");
done();
});
fs.createReadStream(__dirname + '/../samples/npm.json')
.pipe(npm_stream);
});
it('should be able to parse twitter', function (done){
twitter_stream.on("error", function (err) { done(err); });
twitter_stream.on("end", function () {
assert.ok(true, "twit worked");
done();
});
fs.createReadStream(__dirname + '/../samples/twitter.json')
.pipe(twitter_stream);
});
});
}); |