Refactoring test file location. Cleaning up kqed cruft from tests

This commit is contained in:
Kip Gebhardt 2015-02-10 16:56:33 -08:00
parent c48d1abc69
commit be96d7481b
10 changed files with 22 additions and 28 deletions

View File

@ -16,13 +16,13 @@
"license": "ISC",
"dependencies": {
"async": "^0.9.0",
"bunyan": "^1.2.3",
"bunyan": "^1.3.3",
"feedparser": "^0.19.2",
"include-folder": "^0.7.0",
"lodash": "^2.4.1",
"lodash": "^3.1.0",
"mockdate": "^1.0.1",
"request": "^2.51.0",
"rss": "git://github.com/rv-kip/node-rss.git#603b25",
"tape": "^3.0.3"
"request": "^2.53.0",
"rss": "git://github.com/rv-kip/node-rss.git#86f2a74",
"tape": "^3.5.0"
}
}

View File

@ -1,5 +1,5 @@
<?xml version="1.0" encoding="UTF-8"?>
<rss xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:atom="http://www.w3.org/2005/Atom" version="2.0" xmlns:slash="http://purl.org/rss/1.0/modules/slash/" xmlns:media="http://search.yahoo.com/mrss/" xmlns:ev="http://purl.org/rss/2.0/modules/event/" xmlns:sy="http://purl.org/rss/1.0/modules/syndication/" xmlns:wfw="http://wellformedweb.org/CommentAPI/" xmlns:kqed="http://www.kqed.org">
<rss xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:atom="http://www.w3.org/2005/Atom" version="2.0" xmlns:slash="http://purl.org/rss/1.0/modules/slash/" xmlns:media="http://search.yahoo.com/mrss/" xmlns:ev="http://purl.org/rss/2.0/modules/event/" xmlns:sy="http://purl.org/rss/1.0/modules/syndication/" xmlns:wfw="http://wellformedweb.org/CommentAPI/">
<channel>
<title><![CDATA[Test File Feed]]></title>
<description>This feed comes from a file</description>

View File

@ -1,5 +1,5 @@
<?xml version="1.0" encoding="UTF-8"?>
<rss xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:atom="http://www.w3.org/2005/Atom" version="2.0" xmlns:slash="http://purl.org/rss/1.0/modules/slash/" xmlns:media="http://search.yahoo.com/mrss/" xmlns:ev="http://purl.org/rss/2.0/modules/event/" xmlns:sy="http://purl.org/rss/1.0/modules/syndication/" xmlns:wfw="http://wellformedweb.org/CommentAPI/" xmlns:kqed="http://www.kqed.org">
<rss xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:atom="http://www.w3.org/2005/Atom" version="2.0" xmlns:slash="http://purl.org/rss/1.0/modules/slash/" xmlns:media="http://search.yahoo.com/mrss/" xmlns:ev="http://purl.org/rss/2.0/modules/event/" xmlns:sy="http://purl.org/rss/1.0/modules/syndication/" xmlns:wfw="http://wellformedweb.org/CommentAPI/">
<channel>
<title><![CDATA[Test File Feed]]></title>
<description>This feed comes from a file</description>

View File

@ -1,5 +1,5 @@
<?xml version="1.0" encoding="UTF-8"?>
<rss xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:atom="http://www.w3.org/2005/Atom" version="2.0" xmlns:slash="http://purl.org/rss/1.0/modules/slash/" xmlns:media="http://search.yahoo.com/mrss/" xmlns:ev="http://purl.org/rss/2.0/modules/event/" xmlns:sy="http://purl.org/rss/1.0/modules/syndication/" xmlns:wfw="http://wellformedweb.org/CommentAPI/" xmlns:kqed="http://www.kqed.org">
<rss xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:atom="http://www.w3.org/2005/Atom" version="2.0" xmlns:slash="http://purl.org/rss/1.0/modules/slash/" xmlns:media="http://search.yahoo.com/mrss/" xmlns:ev="http://purl.org/rss/2.0/modules/event/" xmlns:sy="http://purl.org/rss/1.0/modules/syndication/" xmlns:wfw="http://wellformedweb.org/CommentAPI/">
<channel>
<title><![CDATA[Test File Feed]]></title>
<description>This feed comes from a file</description>

View File

@ -1,5 +1,5 @@
<?xml version="1.0" encoding="UTF-8"?>
<rss xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:atom="http://www.w3.org/2005/Atom" version="2.0" xmlns:slash="http://purl.org/rss/1.0/modules/slash/" xmlns:media="http://search.yahoo.com/mrss/" xmlns:ev="http://purl.org/rss/2.0/modules/event/" xmlns:sy="http://purl.org/rss/1.0/modules/syndication/" xmlns:wfw="http://wellformedweb.org/CommentAPI/" xmlns:kqed="http://www.kqed.org">
<rss xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:atom="http://www.w3.org/2005/Atom" version="2.0" xmlns:slash="http://purl.org/rss/1.0/modules/slash/" xmlns:media="http://search.yahoo.com/mrss/" xmlns:ev="http://purl.org/rss/2.0/modules/event/" xmlns:sy="http://purl.org/rss/1.0/modules/syndication/" xmlns:wfw="http://wellformedweb.org/CommentAPI/">
<channel>
<title><![CDATA[Test File Feed]]></title>
<description>This feed comes from a file</description>

View File

@ -13,14 +13,13 @@ var feed = {
"media" : "http://search.yahoo.com/mrss/",
"ev" : "http://purl.org/rss/2.0/modules/event/",
"sy" : "http://purl.org/rss/1.0/modules/syndication/",
"wfw" : "http://wellformedweb.org/CommentAPI/",
"kqed" : "http://www.kqed.org"
"wfw" : "http://wellformedweb.org/CommentAPI/"
},
"sources" : [
{
"name" : "sample_feed",
"count" : 5,
"file_path" : __dirname + "/sample_feed.xml",
"file_path" : __dirname + "/../input_files/sample_feed.xml",
},
]

View File

@ -12,14 +12,13 @@ var feed = {
"media" : "http://search.yahoo.com/mrss/",
"ev" : "http://purl.org/rss/2.0/modules/event/",
"sy" : "http://purl.org/rss/1.0/modules/syndication/",
"wfw" : "http://wellformedweb.org/CommentAPI/",
"kqed" : "http://www.kqed.org"
"wfw" : "http://wellformedweb.org/CommentAPI/"
},
"sources" : [
{
"name" : "sample_feed",
"count" : 1,
"file_path" : __dirname + "/sample_feed.xml",
"file_path" : __dirname + "/../input_files/sample_feed.xml",
},
]

View File

@ -13,14 +13,13 @@ var feed = {
"media" : "http://search.yahoo.com/mrss/",
"ev" : "http://purl.org/rss/2.0/modules/event/",
"sy" : "http://purl.org/rss/1.0/modules/syndication/",
"wfw" : "http://wellformedweb.org/CommentAPI/",
"kqed" : "http://www.kqed.org"
"wfw" : "http://wellformedweb.org/CommentAPI/"
},
"sources" : [
{
"name" : "sample_feed",
"count" : 1,
"file_path" : __dirname + "/sample_feed_duplicates.xml",
"file_path" : __dirname + "/../input_files/sample_feed_duplicates.xml",
},
]

View File

@ -13,16 +13,14 @@ var feed = {
"media" : "http://search.yahoo.com/mrss/",
"ev" : "http://purl.org/rss/2.0/modules/event/",
"sy" : "http://purl.org/rss/1.0/modules/syndication/",
"wfw" : "http://wellformedweb.org/CommentAPI/",
"kqed" : "http://www.kqed.org"
"wfw" : "http://wellformedweb.org/CommentAPI/"
},
"sources" : [
{
"name" : "sample_feed",
"count" : 1,
"file_path" : __dirname + "/sample_feed.xml",
"file_path" : __dirname + "/../input_files/sample_feed.xml",
},
]
};
exports.feed = feed;

View File

@ -9,7 +9,7 @@ var mockdate = require('mockdate').set('Wed, 31 Dec 2014 00:00:01 GMT');
test('braid feed from file without plugins', function(t) {
t.plan(1);
var feeds = {};
feeds.sample_feed = require("./input_files/sample_feed").feed;
feeds.sample_feed = require("./feeds/sample_feed").feed;
var braider_options = {
feeds : feeds,
indent : " ",
@ -30,7 +30,7 @@ test('braid feed from file without plugins', function(t) {
test('braid feed from file with plugins', function(t) {
t.plan(1);
var feeds = {};
feeds.sample_feed = require("./input_files/sample_feed_plugins").feed;
feeds.sample_feed = require("./feeds/sample_feed_plugins").feed;
var braider_options = {
feeds : feeds,
indent : " ",
@ -50,7 +50,7 @@ test('braid feed from file with plugins', function(t) {
test('deduplicate feed from file', function(t) {
t.plan(1);
var feeds = {};
feeds.sample_feed = require("./input_files/sample_feed_duplicates").feed;
feeds.sample_feed = require("./feeds/sample_feed_duplicates").feed;
var braider_options = {
feeds : feeds,
indent : " ",
@ -62,7 +62,6 @@ test('deduplicate feed from file', function(t) {
if (err) {
return t.fail(err);
}
// console.log(data);
t.equal(data, expectedOutput.fileFeedOutputPlugins);
});
});
@ -70,7 +69,7 @@ test('deduplicate feed from file', function(t) {
test('sort by date desc', function(t) {
t.plan(1);
var feeds = {};
feeds.sample_feed = require("./input_files/date_sort").feed;
feeds.sample_feed = require("./feeds/date_sort").feed;
var braider_options = {
feeds : feeds,
indent : " ",
@ -90,7 +89,7 @@ test('sort by date desc', function(t) {
test('sort by date asc', function(t) {
t.plan(1);
var feeds = {};
feeds.sample_feed = require("./input_files/date_sort").feed;
feeds.sample_feed = require("./feeds/date_sort").feed;
var braider_options = {
feeds : feeds,
indent : " ",