#NASHILLE SOFTWARE SCHOOL - Cohort 11 front end curriculum
##Unit testing code with the Jest library
###Assignment:
-
You are going to use these concepts to build a JavaScript application that fulfills the following requirements. Check out all of the possible uses of the expect function to meet the requirements.
-
You are going to work on a simple test scenario.
-
Write a test suite to validate your JavaScript functions.
-
There should be a function defined with the name checkWordCount.
-
That function should return false if a string sent to it has more than 100 words in it.
-
There should be a function defined with the name duplicateCheck.
-
That function should return false if a string has duplicate words in it.
-
There should be a function defined with the name verifyAlphaNumeric.
-
That function should return false if there are any non-alphanumeric characters in a string.
-
Now that the test suite exists, write a simple application to implement the functionality.
-
In an HTML file, have two elements: a textarea and a button.
-
When the button is clicked, extract the contents of the textarea and validate it against the following rules.
-
There should only be alphanumeric characters in the text. No special characters like $%^&*.
-
No duplicate words allowed.
-
Word count should be less than 100.