Commit Graph

140 Commits

Author SHA1 Message Date
Roland Hummel
b13b12e88c chore: merge Fix/742 migrate doctest to jest (#749)
* Remove QuickSelect doctest

There are more Jest test cases already.

* Remove AverageMedian doctest

Already migrated to jest

* Migrate doctest for BinaryExponentiationRecursive.js

(also remove inline "main" test method)

* Migrate doctest for EulersTotient.js

(also remove inline "main" test method)

* Migrate doctest for PrimeFactors.js

(also remove inline "main" test method)

* Migrate doctest for BogoSort.js

Re-write prototype-polluting helper methods, too.

(also remove inline test driver code)

* Migrate doctest for BeadSort.js

(also remove inline test driver code)

* Migrate doctest for BucketSort.js

(also remove inline test driver code)

* Migrate doctest for CocktailShakerSort.js

(also remove inline test driver code)

* Migrate doctest for MergeSort.js

(also remove inline test driver code)

* Migrate doctest for QuickSort.js

(also remove inline test driver code)

* Migrate doctest for ReverseString.js

(also remove inline test driver code)

* Migrate doctest for ReverseString.js

* Migrate doctest for ValidateEmail.js

* Migrate doctest for ConwaysGameOfLife.js

(remove the animate code, too)

* Remove TernarySearch doctest

Already migrated to jest

* Migrate doctest for BubbleSort.js

(also remove inline test driver code)

* Remove doctest from CI and from dependencies

relates to #742
fixes #586

* Migrate doctest for RgbHsvConversion.js

* Add --fix option to "standard" npm script

* Migrate doctest for BreadthFirstSearch.js

(also remove inline test driver code)

* Migrate doctest for BreadthFirstShortestPath.js

(also remove inline test driver code)

* Migrate doctest for EulerMethod.js

(also remove inline test driver code)

Move manual test-code for plotting stuff in the browser in a distinct file, too. Those "*.manual-test.js" files are excluded from the UpdateDirectory.mjs script, as well.

* Migrate doctest for Mandelbrot.js

(also remove inline test driver code & moved manual drawing test into a *.manual-test.js)

* Migrate doctest for FloodFill.js

* Migrate doctest for KochSnowflake.js

(also move manual drawing test into a *.manual-test.js)

* Update npm lockfile

* Update README and COMMITTING with a few bits & bobs regarding testing & code quality
2021-10-07 12:33:38 +05:30
Sajeeb Ahamed
82d1c2a6bd Merge branch 'master' into master 2021-10-06 00:00:47 +06:00
Keshav Bohra
1589263947 fixed some spellings 2021-10-05 12:49:23 +05:30
Sajeeb Ahamed
bf088c0646 add an algorithm for checking a year is a leap year or not 2021-10-04 01:20:08 +06:00
Legendary Noob
b3b4ad43a3 chore: Added Sum of Digits Implementation (#684)
* Added the main logic, need to work on Tests

* Added tests for SOD

* Fix typo and add Wikipedia link in comments

* Fix mistake in SumOfDigitsUsingStrings

I intended to initially write a different implementation but I wrote something else 🤦‍♂️

* Converted Spacing from Tabs to Spaces

* Oops, forgot about the test file

* Fixed semicolon problems...

* Oops, I missed a few semicolons

* Linting is hell TwT

Co-authored-by: SpiderMath <{ID}+{username}@users.noreply.github.com>
2021-09-13 19:41:28 +05:30
Suryapratap Singh
5e3106e81b fix, self-contained gcd method 2021-09-07 18:10:47 +05:30
Suryapratap Singh
5a8bb67124 fix the string method problem 2021-09-07 17:55:11 +05:30
Suryapratap Singh
800308f216 add CheckKishnamurthyNumber 2021-09-07 03:33:17 +05:30
Suryapratap Singh
7fb345b4bd fix typing style 2021-09-07 03:23:38 +05:30
Suryapratap Singh
617ec6ba27 fix number checking 2021-09-07 03:23:02 +05:30
Suryapratap Singh
d79e2f71fa add CoPrimeCheck method 2021-09-07 03:10:17 +05:30
Suryapratap Singh
09ce0c76a6 change the GetGCD method to GetEuclidGCD method 2021-08-31 13:53:49 +05:30
Suryapratap Singh
92b8b46f36 add type checking 2021-08-31 13:48:39 +05:30
Suryapratap Singh
c67b0e9f1d add ReverseNumber method 2021-08-31 03:53:53 +05:30
Suryapratap Singh
d7e8bf492d fix types error in GetGCD method 2021-08-31 03:33:35 +05:30
Suryapratap Singh
60b185d8cb re-formate GetGCD with standard.js 2021-08-31 03:32:44 +05:30
Suryapratap Singh
10373dda7b add GetGCD method 2021-08-31 03:31:53 +05:30
Enoch-Moke
75f184641a Update Coordinate.test.js
Re-upload of code after standard --fix
2021-07-27 16:16:07 +08:00
Enoch-Moke
cba900e628 Create Coordinate.test.js
Previous submission for the similar file in pull request #646 was deleted accidentally. This is a reupload with correct coding that passed local test.
2021-07-27 15:53:59 +08:00
Enoch-Moke
d46e467d0b Update Coordinate.js
Style compliance.
2021-07-27 13:28:57 +08:00
Enoch-Moke
3788dfc0ec Create Coordinate.js
This is a new file that should serve as a future collection of algorithms involving solutions for coordinates. The first algorithm is a function to calculate the distance between 2 coordinates on a 2D plane.
2021-07-27 03:56:55 +08:00
leeyan44
23714cb154 Update Volume.test.js 2021-07-20 15:08:31 +08:00
leeyan44
5d62b4aa1b Update Volume.test.js 2021-07-20 15:03:22 +08:00
leeyan44
fe5e939bb9 Update Volume.test.js 2021-07-20 14:52:19 +08:00
leeyan44
48fec3d571 Update Volume.test.js 2021-07-20 14:41:25 +08:00
leeyan44
45cde7a4aa Update Volume.test.js 2021-07-20 14:25:24 +08:00
leeyan44
ab761ec892 Added Volume.test.js file
Volume.test.js file is to test on the calculations for the Volume.js file.
2021-07-20 14:14:53 +08:00
leeyan44
f2aad7bc57 Update on Volume.js formatting error 2021-07-20 12:38:47 +08:00
leeyan44
f52637f546 Update Maths/Volume.js
Co-authored-by: Rak Laptudirm <raklaptudirm@gmail.com>
2021-07-20 11:56:21 +08:00
leeyan44
9546f239f3 Update Volume.js 2021-07-20 00:07:27 +08:00
leeyan44
d7626e3b63 Update Volume.js 2021-07-19 22:44:12 +08:00
leeyan44
3931903733 create a Volume.js in the math file
Volume.js in the math file is to calculate the volume of some shapes such as Cuboid, Cube, Cone, Pyramid, Cylinder, Triangular Prism, Pentagonal Prism, Sphere and Hemisphere.
2021-07-19 22:13:47 +08:00
Rak Laptudirm
e5b7e56f00 chore: Strict equal for tests 2021-07-19 13:25:00 +05:30
Rak Laptudirm
d41b6aade5 chore: Update test values 2021-07-19 13:21:35 +05:30
Rak Laptudirm
6ac0d61185 style: update style 2021-07-19 13:17:06 +05:30
Rak Laptudirm
cd061ccf25 chore: add tests. 2021-07-19 13:12:47 +05:30
Rak Laptudirm
a62b62dfa7 chore: commit FareyApproximation.js 2021-07-19 13:04:44 +05:30
qingwen23
937b472dfa Update AverageMedian.js and AverageMedian.test.js 2021-07-19 13:34:38 +08:00
qingwen23
04b71c337a Update AverageMedian.js and added AverageMedian.test.js 2021-07-19 12:44:48 +08:00
qingwen23
188c6f6537 Fixed minor grammar typo in AverageMedian function 2021-07-19 03:05:43 +08:00
qingwen23
ab229c08a2 Added wiki reference link for Median 2021-07-19 02:54:42 +08:00
qingwen23
feefe881ea Added AverageMedian function 2021-07-19 02:44:37 +08:00
AbhinavXT
a55248a3b7 Added RadianToDegree.js and RadianToDegree.test.js in Maths directory 2021-07-10 14:42:53 +05:30
AbhinavXT
988177915f Corrections 2021-07-09 22:51:08 +05:30
AbhinavXT
ec37421591 Added DegreeToRadian.js and DegreeToRadian.test.js in Maths directory 2021-07-09 22:15:43 +05:30
AbhinavXT
709de83feb Added jest file in tests, added description and normal even number test(divisibility by 2 ) 2021-07-03 18:27:43 +05:30
AbhinavXT
121357476e Added IsEven Function to Maths directory 2021-07-02 20:24:18 +05:30
Rak Laptudirm
a9b1f8994f chore(SquareRoot.js): Better Precision constant 2021-05-30 17:04:24 +05:30
Rak Laptudirm
f813ae46e8 Merge pull request #597 from Masa-Shin/fix-maths-is-divisible
Fix Maths/IsDivisible
2021-05-23 14:46:55 +05:30
Masahiko Shin
6d8b134ce7 Formatted with standard 2021-05-23 18:09:39 +09:00