From fc5b454ad33a38e8e4251b803c3dac1a07457f63 Mon Sep 17 00:00:00 2001 From: coderaiser Date: Thu, 17 Aug 2017 14:17:28 +0300 Subject: [PATCH] test(markdown) coverage --- test/server/markdown.js | 15 +++++++++++++++ 1 file changed, 15 insertions(+) diff --git a/test/server/markdown.js b/test/server/markdown.js index a5d87041..973cf016 100644 --- a/test/server/markdown.js +++ b/test/server/markdown.js @@ -19,6 +19,21 @@ const get = promisify((url, fn) => { fn(null, request(url)); }); +test('cloudcmd: markdown: error', (t) => { + before((port, after) => { + get(`http://localhost:${port}/api/v1/markdown/not-found`) + .then(warp(_pullout, 'string')) + .then((result) => { + t.ok(/ENOENT/.test(result), 'should not found'); + t.end(); + after(); + }) + .catch((error) => { + console.log(error); + }); + }); +}); + test('cloudcmd: markdown: relative: error', (t) => { before((port, after) => { get(`http://localhost:${port}/api/v1/markdown/not-found?relative`)