move from nodeunit to mocha for tests. added npm test to run tests.

This commit is contained in:
Dylan Greene
2013-09-14 15:12:40 -04:00
parent ca585361c9
commit 18e9422524
4 changed files with 40 additions and 37 deletions

View File

@@ -11,7 +11,7 @@ function RSS (options, items) {
this.title = options.title || 'Untitled RSS Feed';
this.description = options.description || '';
this.generator = options.generator || 'NodeJS RSS Module';
this.generator = options.generator || 'RSS for Node';
this.feed_url = options.feed_url;
this.site_url = options.site_url;
this.image_url = options.image_url;
@@ -85,8 +85,7 @@ function generateXML (data){
ifTruePush(category, channel, { category: { _cdata: category } });
});
}
// { updated: new Date().toGMTString() }
data.items.forEach(function(item) {
var item_values = [
{ title: { _cdata: item.title } }
@@ -141,6 +140,4 @@ function generateXML (data){
] };
}
module.exports = RSS;
module.exports = RSS;