mirror of
https://github.com/DavidAnson/markdownlint.git
synced 2026-04-25 09:16:02 +03:00
[GH-ISSUE #127] Documentation on writing tests? #106
Labels
No labels
bug
enhancement
enhancement
enhancement
fixed in next
fixed in next
fixed in next
new rule
new rule
new rule
pull-request
question
refactoring
refactoring
No milestone
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set.
Reference
starred/markdownlint#106
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Originally created by @JoshuaKGoldberg on GitHub (Jun 22, 2018).
Original GitHub issue: https://github.com/DavidAnson/markdownlint/issues/127
It's not clear from the files under
test/in this repo what the steps are to CRUD tests. Could you write some documentation on this please?@DavidAnson commented on GitHub (Jun 22, 2018):
Tests are run by
npm testin the usual manner. All tests pass on Windows (my environment, CRLF) and Linux (Coveralls, LF, https://travis-ci.org/DavidAnson/markdownlint/builds/384576202). The test runner is the popularnodeunit(https://github.com/caolan/nodeunit) and test cases are found intest/markdownlint-test.js. Additionally,test/*.mdfiles are enumerated, linted, and pass/fail according to whether every line that triggers a warning has corresponding "{MD###}" text. For example, the line#### Heading 2 {MD001}is expected to triggerMD001. For cases where the marker can not be on the same line, the syntax "{MD###:#}" can be used to identify a different line number. If thesometest.mdfile needs custom configuration, asometest.jsonfile is used to provide a customoptions.configfor that test. For code coverage, runnpm run test-coverand for linting, runnpm run lint.