# Testing #

## Getting Started ##
1. Ensure that your html-controls are up to date by running the command [$ git pull]
2. Install npm (if not installed already)
   - to verify that it is installed run the command [$ npm -v] to get the version number
3. Install Jest using the command [$ npm install --save-dev jest] in the html-controls directory
4. Verify that Jest is working by running the command [$ npm run test]; this should run all existing tests

## Creating a test ##
1. Create a JS file to store the function you are testing
2. Move the function over and refactor it to be independent of the jOmnis.callbackObject (if necessary)
3. Set the last line of the JS file to be [module.exports = _function_name_;] where _function_name is the name of your function
4. Create a sub-directory in the same directory called "test" if there isn't one already
5. Create a new JS file with the name formatted as "first_js_file.test.js" where first_js_file is the name of the file created in step #1
6. Set the first line of the test file to be [const _module_name_ = require('../_module_name_')] where _module_name_ is the name of the module created in step #3.
7. Add tests to the test JS file.

See test_logo_pane for reference
Go to https://jestjs.io for more information!
