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
- Host: GitHub
- URL: https://github.com/muthhukumar/unit-test-example
- Owner: muthhukumar
- Created: 2020-08-25T08:12:34.000Z (almost 6 years ago)
- Default Branch: master
- Last Pushed: 2020-08-25T08:33:51.000Z (almost 6 years ago)
- Last Synced: 2025-01-29T03:48:40.841Z (over 1 year ago)
- Language: JavaScript
- Size: 14.6 KB
- Stars: 1
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: readme.md
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