initial commit
[squeep-indieauth-helper] / test / test-data / communication.js
diff --git a/test/test-data/communication.js b/test/test-data/communication.js
new file mode 100644 (file)
index 0000000..a78e718
--- /dev/null
@@ -0,0 +1,68 @@
+'use strict';
+
+module.exports = {
+  linkHeaders: {
+    'link': '<https://thuza.ratfeathers.com/>; rel="self", <https://hub.squeep.com/>; rel="hub", <https://thuza.ratfeathers.com/image.png>; rel="preload"; as="image"',
+  },
+  hCardHtml: `<!DOCTYPE html>
+<html lang="en">
+  <head>
+    <meta name="viewport" content="width=device-width,initial-scale=1">
+    <title>Thuza Exists</title>
+    <link rel="authorization_endpoint" href="https://ia.squeep.com/auth">
+    <link rel="token_endpoint" href="https://ia.squeep.com/token">
+    <link rel="canonical" href="https://thuza.ratfeathers.com/">
+  </head>
+  <body>
+    <main>
+      <section>
+      Nothing to share yet, only a profile.
+      </section>
+      <section class="h-card p-author" style="display:none">
+        <img class="u-photo" src="image.png">
+        <a class="p-name u-url" rel="author me" href="">Thuza</a>
+      </section>
+    </main>
+  </body>
+</html>`,
+  multiMF2Html: `<!DOCTYPE html>
+  <html lang="en">
+    <head>
+      <meta name="viewport" content="width=device-width,initial-scale=1">
+      <title>Thuza Exists</title>
+      <link rel="authorization_endpoint" href="https://ia.squeep.com/auth">
+      <link rel="token_endpoint" href="https://ia.squeep.com/token">
+      <link rel="canonical" href="https://thuza.ratfeathers.com/">
+    </head>
+    <body>
+      <main>
+        <section>
+        Nothing to share yet, only a profile.
+        </section>
+        <section class="h-card p-author" style="display:none">
+          <a class="p-name u-url" rel="author me" href="">Thuza</a>
+        </section>
+        <section class="h-card" style="display:none">
+          <img class="u-photo" src="image.png">
+          <a class="p-name u-url" rel="me" href="">Also Thuza</a>
+        </section>
+        <section class="h-app" style="display:none">
+          <a class="p=name u-url" href="">Also Some Client</a>
+        </section>
+      </main>
+    </body>
+</html>`,
+  noneMF2Html: `<!DOCTYPE html>
+<html lang="en">
+  <head>
+    <title>None Data</title>
+  </head>
+  <body>
+    <main>
+      <section>
+        No microformat data here.
+      </section>
+    </main>
+  </body>
+</html>`,
+  };