Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Docs: Add section about customizing RuleTester (fixes #6227) #6331

Merged
merged 3 commits into from Jun 9, 2016
Merged
Changes from 2 commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
5 changes: 5 additions & 0 deletions docs/developer-guide/working-with-plugins.md
Expand Up @@ -140,6 +140,11 @@ ruleTester.run("custom-plugin-rule", rule, {
});
```

#### Customizing RuleTester

To create tests for each valid and invalid case, RuleTester internally uses `describe` and `it` methods from the Mocha test framework when it is available. If you use another test framework, you can override `RuleTester.describe` and `RuleTester.it` to make RuleTester compatible with it and have proper individual tests and feedback.
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Can you make RuleTester in code front everywhere? Seems best to keep it consistent.

Also, maybe show an example right here?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Sounds good. when you say code front, you mean like this, right?



## Share Plugins

In order to make your plugin available to the community you have to publish it on npm.
Expand Down