An open API service indexing awesome lists of open source software.

https://github.com/muthhukumar/unit-test-example

Refactoring a function and unit testing the function
https://github.com/muthhukumar/unit-test-example

Last synced: 11 months ago
JSON representation

Refactoring a function and unit testing the function

Awesome Lists containing this project

README

          

# question
```js
Function( checkForAgesOver21AndTheirDetails) {
Call database to get Names, address, DOB and phone number
Get resultset
Run in a loop
Parse resultset
Find the value Of Today’s Date – DOB
If age > 21, Then assign variables
Get all the details of those with age over 21 in some data structure
Return datastructure;
}
```
TODOS
* Refactor the function
* Then do the mock testing