rss-parser
Advanced tools
Comparing version 2.2.4 to 2.3.0
@@ -16,2 +16,3 @@ var Entities = require("entities"); | ||
'author', | ||
'content:encoded', | ||
] | ||
@@ -95,3 +96,4 @@ | ||
if (item.guid) { | ||
entry.guid = item.guid[0]._; | ||
entry.guid = item.guid[0]; | ||
if (entry.guid._) entry.guid = entry.guid._; | ||
} | ||
@@ -106,3 +108,3 @@ if (item.category) entry.categories = item.category; | ||
XML2JS.parseString(xml, function(err, result) { | ||
if (err) throw err; | ||
if (err) return callback(err); | ||
if (result.feed) { | ||
@@ -109,0 +111,0 @@ return parseAtomFeed(result, callback) |
{ | ||
"name": "rss-parser", | ||
"version": "2.2.4", | ||
"version": "2.3.0", | ||
"main": "index.js", | ||
@@ -5,0 +5,0 @@ "scripts": { |
@@ -45,1 +45,13 @@ # rss-parser | ||
### Running Tests | ||
The tests run the RSS parser for several sample RSS feeds in `test/input` and outputs the resulting JSON into `test/output`. If there are any changes to the output files the tests will fail. | ||
To check if your changes affect the output of any test cases, run | ||
`npm test` | ||
To update the output files with your changes, run | ||
`WRITE_GOLDEN=true npm test` | ||
@@ -16,2 +16,3 @@ var FS = require('fs'); | ||
Parser.parseFile(IN_DIR + '/' + name + '.' + ext, function(err, parsed) { | ||
console.log('e', err, parsed); | ||
Expect(err).to.equal(null); | ||
@@ -59,2 +60,10 @@ if (process.env.WRITE_GOLDEN) { | ||
}) | ||
it('should parse Instant Article', function(done) { | ||
testParseForFile('instant-article', 'rss', done); | ||
}); | ||
it('should parse Feedburner', function(done) { | ||
testParseForFile('feedburner', 'atom', done); | ||
}); | ||
}) |
Sorry, the diff of this file is too big to display
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
1050122
25
14853
57