Includes a new test file for unit testing our (non-DOM-related) base functions
scripts-test.js
Includes a new file to house the base functions
scriptDefinitions.js
Removes base functions from the scripts.js file and adds them to the scriptDefinitions.js file
The scripts.js file shouldn't contain any function definitions—it should be the file where we use the base functions
Add tests for generateRandomUserID function
Add tests for selectCurrentUser function
Clean up files
Contributors
@ericahagle
Notes
This PR is catch up because the tests weren't written along with the implementation code for these particular functions
Going forward, we'll be including the tests in the PRs for the functions themselves
Before starting on the actual tests for the functions, I needed to update UserRepository-test.js so that it actually works, so that is also included in this PR
This PR also includes minor formatting fixes
Checklist
[x] My PR has an appropriately descriptive and concise title.
[x] My PR denotes any/all team members who contributed to it.
[x] My code follows the Turing Style Guides and best practices.
[x] I ran the code locally and verified that there are no visible errors, and all tests pass.
[x] test: My PR clearly describes what tests I'm adding/updating and why. (if applicable)
Description
scripts-test.js
scriptDefinitions.js
scripts.js
file and adds them to thescriptDefinitions.js
filescripts.js
file shouldn't contain any function definitions—it should be the file where we use the base functionsgenerateRandomUserID
functionselectCurrentUser
functionContributors
@ericahagle
Notes
UserRepository-test.js
so that it actually works, so that is also included in this PRChecklist