From f401bbc9d3dadb63f9ef43eb5417412641b54c6d Mon Sep 17 00:00:00 2001 From: Matt Huntington Date: Thu, 18 Feb 2016 20:27:12 -0500 Subject: [PATCH] adding basic test with links --- spec/basic-spec.js | 13 +++++++++++++ spec/one-spec.js | 6 ------ tests/output/links.html | 11 +++++++++++ 3 files changed, 24 insertions(+), 6 deletions(-) create mode 100644 spec/basic-spec.js delete mode 100644 spec/one-spec.js create mode 100644 tests/output/links.html diff --git a/spec/basic-spec.js b/spec/basic-spec.js new file mode 100644 index 0000000..2080b75 --- /dev/null +++ b/spec/basic-spec.js @@ -0,0 +1,13 @@ +var fs = require('fs'); +var converter = require('../index.js'); + +describe("links", function () { + it("should multiply render links", function (done) { + fs.readFile('tests/links.txt', 'utf8',function(err, input){ + fs.readFile('tests/output/links.html', 'utf8',function(err, output){ + expect(converter(input)+'\n').toBe(output); + done(); + }); + }); + }); +}); diff --git a/spec/one-spec.js b/spec/one-spec.js deleted file mode 100644 index ab0fccd..0000000 --- a/spec/one-spec.js +++ /dev/null @@ -1,6 +0,0 @@ -describe("multiplication", function () { - it("should multiply 2 and 3", function () { - var product = 6; - expect(product).toBe(6); - }); -}); diff --git a/tests/output/links.html b/tests/output/links.html new file mode 100644 index 0000000..df5749f --- /dev/null +++ b/tests/output/links.html @@ -0,0 +1,11 @@ + +

this is a link in a paragraph with https: https://www.google.com