-
Notifications
You must be signed in to change notification settings - Fork 38
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
1 changed file
with
13 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,13 @@ | ||
# How to add tests | ||
|
||
* Update `./src/.stylelintrc.json` with your new rules | ||
* Run npm run build to generate `./index.js` | ||
* Create your test file named after the scss-lint your you are adding a stylelint rule for | ||
* Copy the code from one of the other tests into your test new file | ||
* Update the test so you have .scss code that will produce lint you want to test for | ||
* Add a console.log statement within the checkResult function in the test file passing `result` to the log statement. e.g. `console.log(result)` | ||
* Look for warnings it generates | ||
* Copy expected text to test file | ||
* Escape quotes in your expected error text | ||
* Run tests again and refine until they pass | ||
* Update `t.plan(2)` to the number of tests you have |