display history of topic updates on topic details page
[websub-hub] / test / src / template / template-helper.js
index 8c8579d1cc5a83b3d65b8acd2c232805d61097a8..5a62a7c4b15f4d68a9c12f1a61461eda6c8c520d 100644 (file)
@@ -63,4 +63,19 @@ describe('Template Helper', function () {
     });
   }); // renderSubscriptionRowHeader
 
+  describe('xmlEscape', function () {
+    it('ignores numbers', function () {
+      const result = th.xmlEscape(3);
+      assert.strictEqual(result, 3);
+    });
+    it('ignores objects', function () {
+      const result = th.xmlEscape({});
+      assert.strictEqual(result, undefined);
+    });
+    it('escapes a thing', function () {
+      const result = th.xmlEscape('&');
+      assert.strictEqual(result, '&');
+    });
+  }); // xmlEscape
+
 });