Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

Currently the LiteFarm codebase has some unit tests for the Express API written using the Jest Javascript testing framework. There are individual test files for each of the user flows in the app and the naming convention for these files is <<userflow>>.test.js. Here is an excerpt.

...

Early in each sprint QA writes test plans for all tickets in the sprint, which can be found in the projects confluence page under the Sprints section and linked to individual tickets on jiraJira. These test plans should be used as guidance by developers when writing unit tests for the api and will specify the minimum test requirements for the ticket(can be found in the “Back end” column of the test plan page). Developers are encouraged to exceed this guidance when writing their tests based on their own unique knowledge of their solution. QA will review each PR and approve only Apart from the current reviews of pull requests by members of the engineering team before merging into the integration branch, QA is required to also review each pull request and their approval(or lack there of) will also block merges into integration. QA will approve PR’s when the minimum test plan requirements have been implemented.

Example

LF-2229 includes changes to the API, the test plan for this ticket outlines some API testing requirements, the resulting Jest tests in the code base look to confirm these API testing requirements are met, one of these tests is below:

...