diff --git a/test/mocha/getMarkdownFiles.js b/test/mocha/getMarkdownFiles.js index 2c6f622..ede2277 100644 --- a/test/mocha/getMarkdownFiles.js +++ b/test/mocha/getMarkdownFiles.js @@ -7,24 +7,7 @@ var base_dir = __dirname + '/../..', process.LIB = lib_dir; -//process.MSGS = require(lib_dir + 'msgs.js'); - -process.MSGS = { - could_not_read_md_dir: 'Could not read this directory: ', - empty_dir:'There are no files in this directory', - file_not_specified: - 'No markdown file specified, will try to find any markdown file now', - file_specified: 'Markdown file specified', - check_exists: 'Checking if the specified file exists', - does_not_exists: 'The following file does not exist: ', - no_md_files: 'No markdown files to use, will exit now', - files_used: 'The following markdown file(s) will be used: ', - bad_tags: 'The required tags are not present (details below) in file: ', - no_table_re: 'Could not find the table of contents in file: ', - no_content_re: 'Could not find the content in file: ', - processed_file_err: 'Could not write processed_file because ' -}; - +process.MSGS = require(lib_dir + 'msgs.js'); process.logErr = function (){}; process.log = function (){}; diff --git a/test/mocha/isMarkdown.js b/test/mocha/isMarkdown.js index 51fe2c7..9ba6cf8 100644 --- a/test/mocha/isMarkdown.js +++ b/test/mocha/isMarkdown.js @@ -11,6 +11,10 @@ describe('#isMarkdown', function (){ assert.equal(isMarkdown('test.markdown'), true); }); + it('returns false if we test a file without a markdown extension', function (){ + assert.equal(isMarkdown('test.not_md'), false); + }); + it("doesn't throw when the regex pattern can't find any form of file extension", function (){ assert.doesNotThrow(function (){ isMarkdown('test');