From 7d1ca9bdccf85bc852766e710a9418c0e2ebdde3 Mon Sep 17 00:00:00 2001 From: nfrasser Date: Fri, 6 Nov 2015 00:20:20 -0500 Subject: [PATCH] Tests for linkify-html --- test/spec/linkify-html-test.js | 19 +++++++++++++++++++ 1 file changed, 19 insertions(+) create mode 100644 test/spec/linkify-html-test.js diff --git a/test/spec/linkify-html-test.js b/test/spec/linkify-html-test.js new file mode 100644 index 00000000..6d323abc --- /dev/null +++ b/test/spec/linkify-html-test.js @@ -0,0 +1,19 @@ +var linkifyHtml = require('../../lib/linkify-html'); +var htmlOptions = require('./html/options'); + +describe('linkify-html', function () { + + it('Works with default options', function () { + var linkified = linkifyHtml(htmlOptions.original); + expect(htmlOptions.linkified).to.contain(linkified); + }); + + it('Works with overriden options', function () { + var linkified = linkifyHtml( + htmlOptions.original, + htmlOptions.altOptions + ); + expect(htmlOptions.linkifiedAlt).to.contain(linkified); + }); + +});