Skip to content

Commit 0d0a904

Browse files
committed
Add test policy to CONTRIBUTING.md
Fulfills the test_policy and tests_documented_added OpenSSF Best Practices Badge requirements.
1 parent 8e49286 commit 0d0a904

File tree

1 file changed

+12
-0
lines changed

1 file changed

+12
-0
lines changed

CONTRIBUTING.md

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -71,6 +71,18 @@ 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. Perfect coverage isn’t required, but we
84+
do ask that you exercise the main use cases and scenarios.
85+
7486
With tests running and passing, you are ready to contribute to Elixir and
7587
[send a pull request](https://help.github.com/articles/using-pull-requests/).
7688
We have saved some excellent pull requests we have received in the past in

0 commit comments

Comments
 (0)