- Current version of NodeJS.
- npm package manager.
- Clone the repository and fork your clone.
- Navigate to the folder you cloned.
- cd into the project folder.
npm install
to download dependencies.
- Create a branch for your work.
- Make your changes and save.
- Check which files were modified using git status.
- Stage these changed files in git (eg. git add file1 file2)
- Commit your changes, git commit -m "description of changes here..."
- Push your commits and branch to your fork, git push origin {your branch name}
- Create a pull request on GitHub detailing your changes and how you tested your solution.
npm run lint
will run all JavaScript files against the project style guides found in .eslintrc. Excludes md, html, css, json files.npm run eslint-fix
will do the same aslint
and also "fix" any errors.npm run eslint
is the same as the first command, but more typing.
npm run prettier-check
runs a check against the prettier style guide found in prettierrc.json for all JavaScript files. Excludes md, html, css, json files.npm run prettier
runs the same check and adds --write option to attempt to fix the style issues.
- This tool uses a framework called Jest for testing.
- To write additional tests, look for files ending in
.test.js
or.spec.js
and find thedescribe()
suite that matches the task you want to test. - When creating a new test or test suite, please add to the
describe()
orit()
method what the purpose of the test is. For exampleit("should return a string")
. - To run all the test suites, type
npm test
in the command line. - To exclude a test, you may go into the test file and change
it()
toxit()
to exclude a single test. - To exclude all tests/suites except one, add the
only()
method todescribe()
orit()
to run that test suite or individual test.