03-feed.js 414 B

12345678910111213141516171819
  1. //Runs tests for feeds
  2. var helper = require("./test-helper.js"),
  3. FeedHandler = require("../lib/FeedHandler.js"),
  4. fs = require("fs"),
  5. path = require("path");
  6. helper.mochaTest("Feeds", __dirname, function(test, cb){
  7. fs.readFile(
  8. path.join(__dirname, "Documents", test.file),
  9. function(err, file){
  10. helper.writeToParser(
  11. new FeedHandler(cb),
  12. { xmlMode: true },
  13. file.toString()
  14. );
  15. }
  16. );
  17. });