http://kursybankucentralnego.pl/
Setting up the repository
git clone
this repository.- Install NPM and run
npm install --save-dev jest
andnpm install frisby --save-dev
in folderkursybankucentralnegopl/
to have Jest library, needed for tests in this project. Verify that./node_modules
folder was created. - (Optional) Install Jest plugin for your IDE - for example, I use Visual Studio Code and use the
orta.vscode-jest
extension. - Run
npm run test
for running the tests.
Setting up end-to-end automated tests
- Run command:
npm install cypress --save-dev
- Test the installation by running
./node_modules/.bin/cypress open
Additionals
-
You can run
npm run coverage
to see what percentage of code is covered with unit tests. -
GitHub Actions CI is enabled - with each push for this repository, whole set of tests will be run. Also, nightly run of end-to-end tests is set up.
Sites that we have used to learn TDD
https://jestjs.io/docs/getting-started
https://medium.com/swlh/jest-and-github-actions-eaf3eaf2427d