Project Description • Learning • Requirements • Stacks • How to run the application
Descrição do Projeto • Aprendizado • Requisitos • Tecnologias Utilizadas • Rodar a Aplicação
In this project, I wrote unit tests for functions using the Jest module in NodeJS to verify the correct functioning of functions provided by Trybe. Additionally, I wrote functions so that they would pass the tests provided by Trybe.
Both the tests and functions were written following a test-driven development (TDD) approach.
- Writing unit tests for functions using the Jest module in NodeJS to verify their correct behavior
- Writing functions based on pre-implemented tests to meet the proposed test cases
- Using a test-driven development (TDD) approach to write both tests and functions
- ✅ Implement the
averagefunction - ✅ Implement the
test casesfor thenumbersfunction - ✅ Implement the
vqvfunction - ✅ Implement the
test casesfor thecirclefunction - ✅ Implement the
createStudentfunction - ✅ Implement the
calculatorandarrayGeneratorfunctions - ✅ Implement the
myCounterfunction - ✅ Implement the
test casesfor thegetCharacterfunction - ❌ Implement the
test casesfor theproductDetailsfunction - ❌ Implement the
test casesand thecreateMenufunction
Note: In some projects, certain requirements were not completed due to the accelerated pace of the course, not because I couldn't do them. At the time, I just needed a little more time.
I haven't decided yet if it's better to keep it this way to show my learning progress or if I should complete the missing requirements from the course projects.
Feedback is welcome.
- JavaScript
- Jest
- Node
- Clone the repository:
git clone git@github.com:prtpj1/project-js-unit-tests.git - Access the project folder:
cd project-js-unit-tests - Install the dependencies:
npm install - Run the tests separately:
npm test tests/numbers.spec.js
npm test tests/circle.spec.js
npm test tests/productDetails.spec.js
npm test tests/getCharacter.spec.js
npm test tests/createMenu.spec.js - Or run all tests at once:
npm test
The productDetails and createMenu tests were not written during the course, so they will fail. I plan to complete them in the future.
Note:
At the time I created this project, I wasn't familiar with Conventional Commits. I only learned and started making better commits from the BackEnd module of the Trybe course onward.
If you have any difficulty with the instructions and want to give feedback, feel free to send me a message
Neste projeto, escrevi testes unitários para funções utilizando o módulo Jest do NodeJS para verificar o correto funcionamento de funções forncidas pela Trybe e também escrevi funções para que funcionassem corretamente de acordo com testes fornecidos também pela Trybe.
Os testes e funções foram escritos utilizando uma abordagem de desenvolvimento orientado a testes.
- Escrever testes unitários para funções utilizando o módulo Jest do NodeJS para verificar o correto funcionamento dessas funções
- A partir de testes já implementados, escrever funções de forma que elas atendam aos testes propostos
- Escrever testes e funções utilizando uma abordagem de desenvolvimento orientado a testes
- ✅ Implementar a função
average - ✅ Implementar os
casos de testepara a funçãonumbers - ✅ Implementar a função
vqv - ✅ Implementar os
casos de testepara a funçãocircle - ✅ Implementar a função
createStudent - ✅ Implementar as funções
calculatorearrayGenerator - ✅ Implementar a função
myCounter - ✅ Implementar os
casos de testeda funçãogetCharacter - ❌ Implementar os
casos de testepara a funçãoproductDetails - ❌ Implementar os
casos de testee a funçãocreateMenu
OBS: Em alguns projetos alguns requisitos não foram feitos devido a dinamica acelerada do curso e não por eu não saber como fazê-los. Na época eu apenas precisaria de um pouco mais de tempo.
Ainda não decidi se é melhor deixar desta forma para demonstrar o meu progresso durante meu aprendizado ou se seria melhor completar os requisitos que ficaram faltando nos projetos do curso.
Feedbacks são bem vindos.
- JavaScript
- Jest
- Node
- Clone o repositório:
git clone git@github.com:prtpj1/project-js-unit-tests.git - Acesse a pasta do projeto:
cd project-js-unit-tests - Instale as dependências:
npm install - Rode os testes separadamente:
npm test tests/numbers.spec.js
npm test tests/circle.spec.js
npm test tests/productDetails.spec.js
npm test tests/getCharacter.spec.js
npm test tests/createMenu.spec.js - Ou rode todos os testes de uma vez:
npm test
Os testes productDetails e createMenu não foram escritos durante o curso, por tanto falharão. Pretendo completa-los no futuro.
OBS:
Na época que fiz este projeto eu ainda não conhecia os Conventional Commits. Somente a partir do módulo de BackEnd do curso da Trybe que aprendi e comecei a fazer commits melhores.
Se tiver alguma dificuldade com as instruções e quiser dar um feedback me mande uma mensagem



