-
Notifications
You must be signed in to change notification settings - Fork 122
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
docs: explain testing, linting and commit linting
- Loading branch information
Jonathan Ginsburg
committed
Mar 4, 2022
1 parent
d2ad8c6
commit 5400b23
Showing
1 changed file
with
52 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 |
---|---|---|
@@ -1,3 +1,55 @@ | ||
Please see the [Contributing to Karma] guide for information on contributing to this project. | ||
|
||
[Contributing to Karma]: https://github.com/karma-runner/karma/blob/master/CONTRIBUTING.md | ||
|
||
# Pull Requests | ||
|
||
Before filing a PR, ensure that: | ||
|
||
* [ ] Tests pass. | ||
* [ ] Linting passes. | ||
* [ ] Commit linting passes. | ||
|
||
See more details in each subsection below. | ||
|
||
## Testing | ||
|
||
To run unit tests execute: | ||
|
||
```bash | ||
npm run unit-test | ||
``` | ||
|
||
To run integration tests execute: | ||
|
||
```bash | ||
npm run integration-test | ||
``` | ||
|
||
Tip: you can run both unit and integration tests in a single step via: `npm test`. | ||
|
||
## Linting | ||
|
||
To lint your contribution execute: | ||
|
||
```bash | ||
npm run lint | ||
``` | ||
|
||
There are some lint problems that can be auto-fixed for you. Try the following command to trigger auto-fix: | ||
|
||
```bash | ||
npm run lint --fix | ||
``` | ||
|
||
## Commit Linting | ||
|
||
We enforce [Angular's Commit Message Format] in our commit history. To verify that your commits are syntactically correct, execute: | ||
|
||
```bash | ||
npm run commitlint -- \ | ||
--verbose \ | ||
--from `git merge-base origin/master HEAD` | ||
``` | ||
|
||
[Angular's Commit Message Format]: https://github.com/angular/angular/blob/master/CONTRIBUTING.md#commit |