Handle non-Array inputs for options.files.

This commit is contained in:
David Anson 2016-01-15 22:00:34 -08:00
parent c4a0e6c312
commit 1e23d035ce
2 changed files with 19 additions and 1 deletions

View file

@ -643,6 +643,19 @@ module.exports.filesArrayNotModified = function filesArrayNotModified(test) {
});
};
module.exports.filesArrayAsString = function filesArrayAsString(test) {
test.expect(2);
markdownlint({
"files": "README.md",
"config": { "MD013": false }
}, function callback(err, actual) {
test.ifError(err);
var expected = { "README.md": {} };
test.deepEqual(actual, expected, "Unexpected issues.");
test.done();
});
};
module.exports.missingOptions = function missingOptions(test) {
test.expect(2);
markdownlint(null, function callback(err, result) {