This is an API to retrieve the nutritional information of a given food item.
MIT License
1
stars
1
forks
source link
As a contributor to the Nutrition Information API, I want continuous integration to automatically check ~100% code coverage for unit tests of a pull request, so I can automatically assert there have been automated unit tests written for all of the new code. #14
As a contributor to the Nutrition Information API, I want continuous integration to automatically check ~100% code coverage for unit tests of a pull request, so I can automatically assert there have been automated unit tests written for all of the new code.
Acceptance Criteria
Given a PR, when there are new commits, then the code coverage for unit tests is automatically determined.
Given a PR, when there are new commits and code coverage for unit tests is ~100%, the PR can be merged.
Given a PR, when there are new commits and code coverage for unit tests is less than ~100%, the PR cannot be merged.
Test Plan
Testing for this issue will be done manually covering the acceptance criteria by creating pull requests to match each of the criteria.
Development Plan
Use:
mocha for testing
chai for asserting
istanbul for coverage metrics, coverage checks, and reporting
Create .gitignore and add:
node_modules
coverage
Do:
A function to return "hello world" in index.js
Open a Pull Request and see the checks pass
Add a unit test that does not perform 100% coverage
Update package.json's test script to run the unit tests
See the open Pull Request's checks pass
Install istanbul and update package.json's test script to generate coverage reports and ensure 100% coverage
As a contributor to the Nutrition Information API, I want continuous integration to automatically check ~100% code coverage for unit tests of a pull request, so I can automatically assert there have been automated unit tests written for all of the new code.
Acceptance Criteria
Test Plan Testing for this issue will be done manually covering the acceptance criteria by creating pull requests to match each of the criteria.
Development Plan
Definition of Ready