mirror of
https://github.com/DavidAnson/markdownlint.git
synced 2025-12-16 22:10:13 +01:00
Add README.md, Rules.md, test for project files.
This commit is contained in:
parent
77da8da9cf
commit
f6d0986cc5
3 changed files with 742 additions and 1 deletions
|
|
@ -2,9 +2,9 @@
|
|||
|
||||
var fs = require("fs");
|
||||
var path = require("path");
|
||||
var Q = require("q");
|
||||
var markdownlint = require("../lib/markdownlint");
|
||||
var shared = require("../lib/shared");
|
||||
var Q = require("q");
|
||||
|
||||
function createTestForFile(file) {
|
||||
return function testForFile(test) {
|
||||
|
|
@ -67,6 +67,19 @@ fs.readdirSync(__dirname).forEach(function forFile(file) {
|
|||
}
|
||||
});
|
||||
|
||||
module.exports.projectFiles = function projectFiles(test) {
|
||||
test.expect(2);
|
||||
var options = {
|
||||
"files": [ "README.md" ]
|
||||
};
|
||||
markdownlint(options, function callback(err, actual) {
|
||||
test.ifError(err);
|
||||
var expected = { "README.md": {} };
|
||||
test.deepEqual(actual, expected, "Issue(s) with project files.");
|
||||
test.done();
|
||||
});
|
||||
};
|
||||
|
||||
module.exports.missingOptions = function missingOptions(test) {
|
||||
test.expect(2);
|
||||
markdownlint(null, function callback(err, result) {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue