1 | describe('duplicate enclosures', function(){
|
2 |
|
3 | var feed = __dirname + '/feeds/mediacontent-dupes.xml';
|
4 |
|
5 | it('should not have duplicate enclosures from different elements', function (done){
|
6 | fs.createReadStream(feed).pipe(new FeedParser())
|
7 | .once('readable', function () {
|
8 | var stream = this;
|
9 | assert.strictEqual(stream.read().enclosures.length, 2);
|
10 | done();
|
11 | })
|
12 | .on('error', function (err) {
|
13 | assert.ifError(err);
|
14 | done(err);
|
15 | });
|
16 | });
|
17 |
|
18 | });
|
19 |
|