Our team will design a recipe management application.
git clone https://github.com/cse110-fa21-group30/cse110-fa21-group30.git
- Get nodejs if you don't already have.
- In the root dir of this project, run
npm install
. This will install ESLint and Jest. - To run the linter, do
npm run lint
. Only unfixable problems will be reported. - To run unit tests,
npm run test
- To run e2e tests,
npm run e2e
- Make changes in the folder called
source
, more specifically, thehtml
files are placed directly inside thesource
while thecss
andjs
files are placed insideassets/style
andassets/scripts
respectively. - Run
npm run lint
to lint the code up to standard. - Follow the testing writeup, add more unit and end to end tests to the corresponding folder (highly recommended).
- Run
npm run test
to execute unit tests. Fix any issue. - Run
npm run e2e
to execute end to end test. Fix any issue. - Commit all changes and push.
- Make a pull request and fill out the template. Request some reviews.
- Make sure all status checks are passed before merging
- We are using a combination of Jest and puppeteer to run tests.
- Jest is for unit tests and puppeteer is for end to end tests.
- Note there is a folder call
/tests
in the root dir. Within this folder, you have one folder calledunit
and another callede2e
. Each contains an example of how to write a simple test.
This is auto generated by JSDoc You need to follow their guideline (preceding functions with a line or block comment) in order for the documentation to show up. Ex.
/**
* returns the sum of a and b
* @param {int} a - first number
* @param {int} b - second number
*/
const add = (a, b) => a + b;
- Ideally, make sure to lint locally before make the pull request. But it's fine to just push to repo, since CI pipeline would lint again just in case.
- We are using ESLint as linter.
- Only files within the "src" directory would be linted.
- We are using Codacy to analysis the quality of the source code.
- For each pull request, the CI/CD pipeline (this file in particular) would automatically enable Codacy and perform analysis as needed.
- Codacy also provided us the dashboard to monitor various aspects of the project, including code duplication, complexity, etc.