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

Test/user with async await #144

Merged
merged 12 commits into from
Apr 16, 2021
Merged

Conversation

tomivm
Copy link
Collaborator

@tomivm tomivm commented Mar 30, 2021

User test without done() callback.
I don't use generateEmail() because the mocha User o Admin User is deleted after every test.
with this, all the test are isolated and leaves no trace in DB.
What do you think about this @sylvansson ?

@martinbedouret we should stub the email server process to remove the increment of the timeout on the test. like Simon says in #132 PR
https://sinonjs.org/releases/latest/stubs/

@tomivm tomivm requested a review from sylvansson March 30, 2021 14:53
@tomivm tomivm linked an issue Mar 30, 2021 that may be closed by this pull request
@tomivm
Copy link
Collaborator Author

tomivm commented Apr 1, 2021

I mean don´t execute sendEmail it's no so simple. Because we need to test all the rest of Code. I was seeing a way to do it but I can't yet.
the timeout fails it's probably running the test locally. Circleci doesn't get that error because probably takes less than 2 seconds to send the email. the last commit didn't have the increment of time out and is passing the test.
what do you think about this? @sylvansson

@tomivm
Copy link
Collaborator Author

tomivm commented Apr 8, 2021

the problem of slow feedback on test is solved in PR #158

test/controllers/user.js Outdated Show resolved Hide resolved
test/controllers/user.js Outdated Show resolved Hide resolved
test/controllers/board.js Outdated Show resolved Hide resolved
test/helper.js Outdated Show resolved Hide resolved
test/helper.js Outdated Show resolved Hide resolved
test/helper.js Outdated Show resolved Hide resolved
test/controllers/user.js Outdated Show resolved Hide resolved
test/controllers/user.js Outdated Show resolved Hide resolved
test/controllers/user.js Outdated Show resolved Hide resolved
test/controllers/user.js Show resolved Hide resolved
@tomivm tomivm marked this pull request as draft April 13, 2021 18:51
@tomivm tomivm marked this pull request as ready for review April 13, 2021 21:04
@martinbedouret martinbedouret merged commit bae397a into master Apr 16, 2021
@martinbedouret martinbedouret deleted the test/user-with-async-await branch April 16, 2021 14:20
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Tests to endpoints - rewrite User test using async - await.
3 participants