* chore: Switch to Node 20 + Vitest
* chore: migrate to vitest mock functions
* chore: code style (switch to prettier)
* test: re-enable long-running test
Seems the switch to Node 20 and Vitest has vastly improved the code's and / or the test's runtime!
see #1193
* chore: code style
* chore: fix failing tests
* Updated Documentation in README.md
* Update contribution guidelines to state usage of Prettier
* fix: set prettier printWidth back to 80
* chore: apply updated code style automatically
* fix: set prettier line endings to lf again
* chore: apply updated code style automatically
---------
Co-authored-by: github-actions <${GITHUB_ACTOR}@users.noreply.github.com>
Co-authored-by: Lars Müller <34514239+appgurueu@users.noreply.github.com>
* Optimised the factorial function.
There was previously an unnecessary check for if the number was 0 or 1.
* Create WhileLoopFactorial.test.js
The test was not present previously.
* result *= num
* Update WhileLoopFactorial.test.js
* testFactorial function
* Space for formatting.
* should fix the formatting issues. I was having trouble with npx standard, so I just used the online verifier at https://standardjs.com/demo.html