Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Mockar o mongo nos testes #29

Open
2 tasks
matheusbsilva opened this issue Oct 20, 2018 · 3 comments
Open
2 tasks

Mockar o mongo nos testes #29

matheusbsilva opened this issue Oct 20, 2018 · 3 comments
Assignees
Labels
help wanted Extra attention is needed refact test TS

Comments

@matheusbsilva
Copy link
Contributor

matheusbsilva commented Oct 20, 2018

Eu como desenvolvedor desejo realizar um mock do banco de dados mongo para corrigir comportamento randômico dos testes.

Critérios

  • Configurar mock do mongo
  • Utilizar mock em todos os testes
@matheusbsilva matheusbsilva added this to the Sprint 06 milestone Oct 20, 2018
@matheusbsilva matheusbsilva self-assigned this Oct 20, 2018
@matheusbsilva matheusbsilva added the help wanted Extra attention is needed label Oct 20, 2018
@nukdown
Copy link
Collaborator

nukdown commented Oct 22, 2018

possível pacote para fazer o mock
https://www.npmjs.com/package/mongo-mock

@matheusbsilva
Copy link
Contributor Author

A questão é que eu preciso mockar o mongo através do mongoose, ou seja o que eu preciso mockar são as chamadas do mongoose. Essa lib mongo-mock mocka somente chamadas diretas pro mongo.

@matheusbsilva
Copy link
Contributor Author

Débito Sprint 06

@matheusbsilva matheusbsilva removed this from the Sprint 06 milestone Oct 27, 2018
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
help wanted Extra attention is needed refact test TS
Projects
None yet
Development

No branches or pull requests

2 participants