Skip to content

Commit d83f961

Browse files
authored
Add test policy to CONTRIBUTING.md (#14337)
Fulfills the test_policy and tests_documented_added OpenSSF Best Practices Badge requirements.
1 parent b9f012f commit d83f961

File tree

1 file changed

+11
-0
lines changed

1 file changed

+11
-0
lines changed

Diff for: CONTRIBUTING.md

+11
Original file line numberDiff line numberDiff line change
@@ -71,6 +71,17 @@ updating an existing checkout, run `make clean compile`. You can check
7171
[the official build status](https://github.com/elixir-lang/elixir/actions/workflows/ci.yml).
7272
More tasks can be found by reading the [Makefile](Makefile).
7373

74+
We encourage contributors to write tests that capture both existing and newly
75+
introduced behavior, especially for bug fixes and major changes:
76+
77+
* **Bug Fixes:** If you are fixing a bug, please try to include a test that
78+
*fails* before your change and *passes* afterward. This makes it easier to
79+
confirm that the fix addresses the underlying issue and helps prevent
80+
regressions in the future.
81+
* **New Features or Major Changes:** If you are adding a new feature or making
82+
major changes to existing functionality, please add tests that cover the
83+
major parts of that functionality. Aim to have the best code coverage possible.
84+
7485
With tests running and passing, you are ready to contribute to Elixir and
7586
[send a pull request](https://help.github.com/articles/using-pull-requests/).
7687
We have saved some excellent pull requests we have received in the past in

0 commit comments

Comments
 (0)