Day: January 8, 2023
-
Basic unit testing with Jest
Let’s say for example we have a back end function that checks if you are under age from a user’s date of birth. First we load that function: Then we set up some test data, like so: We then run the function using the test datas. In our example the function will return some validation…