Initial release
[websub-hub] / test / test-data / link-helper.js
diff --git a/test/test-data/link-helper.js b/test/test-data/link-helper.js
new file mode 100644 (file)
index 0000000..f402915
--- /dev/null
@@ -0,0 +1,179 @@
+'use strict';
+
+const rssFeedUrl = 'https://puppetcircuits.wordpress.com/feed/';
+const rssFeedBody = `<?xml version="1.0" encoding="UTF-8"?><rss version="2.0"
+       xmlns:content="http://purl.org/rss/1.0/modules/content/"
+       xmlns:wfw="http://wellformedweb.org/CommentAPI/"
+       xmlns:dc="http://purl.org/dc/elements/1.1/"
+       xmlns:atom="http://www.w3.org/2005/Atom"
+       xmlns:sy="http://purl.org/rss/1.0/modules/syndication/"
+       xmlns:slash="http://purl.org/rss/1.0/modules/slash/"
+       xmlns:georss="http://www.georss.org/georss" xmlns:geo="http://www.w3.org/2003/01/geo/wgs84_pos#" xmlns:media="http://search.yahoo.com/mrss/"
+       >
+
+<channel>
+       <title>Puppet Circuits</title>
+       <atom:link href="https://puppetcircuits.wordpress.com/feed/" rel="self" type="application/rss+xml" />
+       <link>https://puppetcircuits.wordpress.com</link>
+       <description></description>
+       <lastBuildDate>Fri, 10 Feb 2012 19:26:16 +0000</lastBuildDate>
+       <language>en</language>
+       <sy:updatePeriod>
+       hourly  </sy:updatePeriod>
+       <sy:updateFrequency>
+       1       </sy:updateFrequency>
+       <generator>http://wordpress.com/</generator>
+<cloud domain='puppetcircuits.wordpress.com' port='80' path='/?rsscloud=notify' registerProcedure='' protocol='http-post' />
+<image>
+               <url>https://s0.wp.com/i/buttonw-com.png</url>
+               <title>Puppet Circuits</title>
+               <link>https://puppetcircuits.wordpress.com</link>
+       </image>
+       <atom:link rel="search" type="application/opensearchdescription+xml" href="https://puppetcircuits.wordpress.com/osd.xml" title="Puppet Circuits" />
+       <atom:link rel='hub' href='https://puppetcircuits.wordpress.com/?pushpress=hub'/>
+       <item>
+               <title>Been a while! And: fun video from Eric</title>
+               <link>https://puppetcircuits.wordpress.com/2012/02/10/been-a-while-and-fun-video-from-eric/</link>
+                                       <comments>https://puppetcircuits.wordpress.com/2012/02/10/been-a-while-and-fun-video-from-eric/#respond</comments>
+
+               <dc:creator><![CDATA[raphaelabrams]]></dc:creator>
+               <pubDate>Fri, 10 Feb 2012 19:26:16 +0000</pubDate>
+                               <category><![CDATA[Uncategorized]]></category>
+               <guid isPermaLink="false">http://puppetcircuits.wordpress.com/?p=164</guid>
+
+                                       <description><![CDATA[Yes, I DO think I can space my posts one year apart! Here&#8217;s a really very nice video that Eric Skiff made that features me and one of my creations.]]></description>
+                                                                               <content:encoded><![CDATA[<p>Yes, I DO think I can space my posts one year apart!</p>
+<p>Here&#8217;s a really very nice video that Eric Skiff made that features me and one of my creations.</p>
+<iframe class='youtube-player' width='560' height='315' src='https://www.youtube.com/embed/7yHF0Ubxdnc?version=3&#038;rel=0&#038;showsearch=0&#038;showinfo=1&#038;iv_load_policy=1&#038;fs=1&#038;hl=en&#038;autohide=2&#038;wmode=transparent' allowfullscreen='true' style='border:0;' sandbox='allow-scripts allow-same-origin allow-popups allow-presentation'></iframe>
+]]></content:encoded>
+
+                                       <wfw:commentRss>https://puppetcircuits.wordpress.com/2012/02/10/been-a-while-and-fun-video-from-eric/feed/</wfw:commentRss>
+                       <slash:comments>0</slash:comments>
+
+
+
+               <media:content url="https://0.gravatar.com/avatar/c19e5ba7f3abc36656779edcc9c6b6eb?s=96&#38;d=identicon&#38;r=G" medium="image">
+                       <media:title type="html">raphaelabrams</media:title>
+               </media:content>
+       </item>
+               <item>
+               <title>Botacon!</title>
+               <link>https://puppetcircuits.wordpress.com/2011/02/22/botacon/</link>
+                                       <comments>https://puppetcircuits.wordpress.com/2011/02/22/botacon/#respond</comments>
+
+               <dc:creator><![CDATA[raphaelabrams]]></dc:creator>
+               <pubDate>Tue, 22 Feb 2011 06:55:49 +0000</pubDate>
+                               <category><![CDATA[robotics]]></category>
+               <category><![CDATA[servos]]></category>
+               <guid isPermaLink="false">http://puppetcircuits.wordpress.com/?p=158</guid>
+
+                                       <description><![CDATA[A little late, but here&#8217;s a video of me talking at Botacon a few months ago.]]></description>
+                                                                               <content:encoded><![CDATA[<p>A little late, but here&#8217;s a video of me talking at Botacon a few months ago.</p>
+<iframe class='youtube-player' width='450' height='254' src='https://www.youtube.com/embed/OV5gG29jvaQ?version=3&#038;rel=1&#038;showsearch=0&#038;showinfo=1&#038;iv_load_policy=1&#038;fs=1&#038;hl=en&#038;autohide=2&#038;wmode=transparent' allowfullscreen='true' style='border:0;' sandbox='allow-scripts allow-same-origin allow-popups allow-presentation'></iframe>
+]]></content:encoded>
+
+                                       <wfw:commentRss>https://puppetcircuits.wordpress.com/2011/02/22/botacon/feed/</wfw:commentRss>
+                       <slash:comments>0</slash:comments>
+
+
+
+               <media:content url="https://0.gravatar.com/avatar/c19e5ba7f3abc36656779edcc9c6b6eb?s=96&#38;d=identicon&#38;r=G" medium="image">
+                       <media:title type="html">raphaelabrams</media:title>
+               </media:content>
+       </item>
+               <item>
+               <title>Oddball Hotplate</title>
+               <link>https://puppetcircuits.wordpress.com/2011/01/22/oddball-hotplate/</link>
+                                       <comments>https://puppetcircuits.wordpress.com/2011/01/22/oddball-hotplate/#comments</comments>
+
+               <dc:creator><![CDATA[raphaelabrams]]></dc:creator>
+               <pubDate>Sat, 22 Jan 2011 21:26:55 +0000</pubDate>
+                               <category><![CDATA[electronics]]></category>
+               <guid isPermaLink="false">http://puppetcircuits.wordpress.com/?p=155</guid>
+
+                                       <description><![CDATA[I made a special hotplate for soldering all the circuit boards for the Blueman project. It&#8217;s 22&#8243; long and 1&#8243; wide. I made it out of a single block of aluminum that I CNC milled to fit two 750 watt heaters and a thermocouple. There&#8217;s also a PIC that monitors the thermocouple and has a [&#8230;]]]></description>
+                                                                               <content:encoded><![CDATA[<iframe class='youtube-player' width='450' height='254' src='https://www.youtube.com/embed/Va2SkWK1QII?version=3&#038;rel=1&#038;showsearch=0&#038;showinfo=1&#038;iv_load_policy=1&#038;fs=1&#038;hl=en&#038;autohide=2&#038;wmode=transparent' allowfullscreen='true' style='border:0;' sandbox='allow-scripts allow-same-origin allow-popups allow-presentation'></iframe>
+<p>I made a special hotplate for soldering all the circuit boards for the Blueman project. It&#8217;s 22&#8243; long and 1&#8243; wide. I made it out of a single block of aluminum that I CNC milled to fit two 750 watt heaters and a thermocouple. There&#8217;s also a PIC that monitors the thermocouple and has a relay to turn the heaters on and off. The display shows target and current temperatures to within 1/4 degree Celcius. Having this to do my soldering kept me from losing my sanity. There&#8217;s 0ver 1000 solder joints on each wand!</p>
+<p>&nbsp;</p>
+]]></content:encoded>
+
+                                       <wfw:commentRss>https://puppetcircuits.wordpress.com/2011/01/22/oddball-hotplate/feed/</wfw:commentRss>
+                       <slash:comments>1</slash:comments>
+
+
+
+               <media:content url="https://0.gravatar.com/avatar/c19e5ba7f3abc36656779edcc9c6b6eb?s=96&#38;d=identicon&#38;r=G" medium="image">
+                       <media:title type="html">raphaelabrams</media:title>
+               </media:content>
+       </item>
+       </channel>
+</rss>`;
+
+const atomFeedUrl = 'https://squeep.com/eats/atom/';
+const atomFeedBody = `<?xml version="1.0" encoding="UTF-8"?>
+<feed
+ xmlns="http://www.w3.org/2005/Atom"
+ xmlns:thr="http://purl.org/syndication/thread/1.0"
+ xml:lang="en" >
+       <title type="text">Fyne Vyttles</title>
+       <subtitle type="text">An incomplete collection of foods worth sharing.</subtitle>
+       <generator>Recipe Index v0.0</generator>
+       <updated>2020-10-08T19:47:16Z</updated>
+       <link rel="alternate" type="text/xhtml" href="https://squeep.com/eats/" />
+       <link rel="self" type="application/atom+xml" href="https://squeep.com/eats/atom/" />
+       <link rel="hub" href="https://hub.squeep.com/" />
+       <id>https://squeep.com/eats/atom/</id>
+       <entry>
+               <author>
+                       <name></name>
+                       <uri>https://squeep.com/eats/</uri>
+               </author>
+               <title>![CDATA[E&amp;O Trading Company Corn Fritters]]</title>
+               <link rel="alternate" type="text/xhtml" href="https://squeep.com/eats/secret/e-and-o-corn-fritters.xhtml" />
+               <id>https://squeep.com/eats/secret/e-and-o-corn-fritters.xhtml</id>
+               <category scheme="https://squeep.com/eats/" term="secret" />
+               <updated>2020-10-08T19:47:16Z</updated>
+               <published>2020-10-08T19:47:16Z</published>
+       </entry>
+       <entry>
+               <author>
+                       <name></name>
+                       <uri>https://squeep.com/eats/</uri>
+               </author>
+               <title>![CDATA[Chevy's Sweet Corn Tamalito]]</title>
+               <link rel="alternate" type="text/xhtml" href="https://squeep.com/eats/secret/chevys-sweet-corn-tamalito.xhtml" />
+               <id>https://squeep.com/eats/secret/chevys-sweet-corn-tamalito.xhtml</id>
+               <category scheme="https://squeep.com/eats/" term="secret" />
+               <updated>2020-07-15T02:15:28Z</updated>
+               <published>2020-07-15T02:15:28Z</published>
+       </entry>
+</feed>
+`;
+
+const htmlUrl = 'https://squeep.com/eats/';
+const htmlBody = `<?xml version="1.0" encoding="UTF-8" ?>
+<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.1//EN"
+   "http://www.w3.org/TR/xhtml11/DTD/xhtml11.dtd">
+<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en"
+      xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+      xsi:schemaLocation="http://www.w3.org/1999/xhtml
+      http://www.w3.org/MarkUp/SCHEMA/xhtml11.xsd"
+>
+<head>
+       <title>Squeep Recipe Book</title>
+       <link rel="preload" href="oldstyle.otf" as="font" type="font/opentype" crossorigin="anonymous" />
+       <link rel="stylesheet" type="text/css" href="eats.css" />
+       <link rel="hub" href="https://hub.squeep.com/" />
+       <link rel="alternate" type="application/atom+xml" title="Atom 1.0" href="https://squeep.com/eats/atom/" />
+</head>
+<body>
+<hr />`;
+
+module.exports = {
+       atomFeedBody,
+       atomFeedUrl,
+       htmlBody,
+       htmlUrl,
+  rssFeedBody,
+       rssFeedUrl,
+};