Add getVersion function to exports for easy access by tooling (ex: CLI).

This commit is contained in:
David Anson 2020-10-17 14:17:35 -07:00
parent bd50a15a96
commit a971361cf2
4 changed files with 28 additions and 1 deletions

View file

@ -1443,3 +1443,11 @@ $$\n`
test.end();
});
});
tape("getVersion", (test) => {
test.plan(1);
const actual = markdownlint.getVersion();
const expected = packageJson.version;
test.equal(actual, expected, "Version string not correct.");
test.end();
});