Skip to content

Commit f9b95f4

Browse files
committed
Doctest Contribution Guidelines | Implementation details and reference
1 parent e720b7d commit f9b95f4

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
@@ -86,6 +86,18 @@ To maximize the readability and correctness of our code, we require that new sub
8686
Be confident that your code works. When was the last time you committed a code change, your build failed, and half of your app stopped working? Mine was last week. Writing tests for our Algorithms will help us ensure the implementations are air tight even after multiple fixes and code changes.
8787
We use a NPM package [doctest](https://www.npmjs.com/package/doctest) to add basic testing functionality to our code. Doctests are simple structured comments that evaluate an function and ensure a required result.
8888
89+
The implementation of doctest is quite simple. You can easily learn it [here](https://www.npmjs.com/package/doctest).
90+
91+
It is advised that you add the Doctests in a multiline comment just after the Algorithm description.
92+
/**
93+
* Algorithm Description Here
94+
* The Wikipedia Link
95+
*/
96+
/**
97+
* Doctests Here
98+
*/
99+
For Code Structure reference see [this file](https://github.com/TheAlgorithms/Javascript/blob/master/Sorts/BubbleSort.js).
100+
89101
90102
- Most importantly,
91103
- **Be consistent in the use of these guidelines when submitting.**

0 commit comments

Comments
 (0)