refactor of authentication and html-templates into separate modules
[websub-hub] / test / lint-html.js
diff --git a/test/lint-html.js b/test/lint-html.js
new file mode 100644 (file)
index 0000000..4b5cd47
--- /dev/null
@@ -0,0 +1,13 @@
+'use strict';
+
+const assert = require('assert');
+const stubLogger = require('./stub-logger');
+const { lint } = require('html-minifier-lint'); // eslint-disable-line node/no-unpublished-require
+
+function lintHtml(html) {
+  const result = lint(html);
+  stubLogger.debug('lintHtml', '', { result, html });
+  assert(!result);
+}
+
+module.exports = lintHtml;