Navigation Menu

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

tests: remove eslint-disable jest/no-test-callback #1312

Merged
merged 3 commits into from Jul 25, 2020
Merged

tests: remove eslint-disable jest/no-test-callback #1312

merged 3 commits into from Jul 25, 2020

Conversation

michga
Copy link
Contributor

@michga michga commented Jul 25, 2020

Pull Request

Problem

I'm proposing a way to remove the use of // eslint-disable-next-line jest/no-test-callback in one of the tests.

Solution

We can use a Promise to remove the use of the callback.
If resolve isn't called for some reason, the test will fail after 5 seconds (timeout).

ChangeLog

Instead of using the `done` callback from the test function, we can be using a Promise instead.
I've checked that if `resolve` is not called the test fails (timeout).
Copy link
Collaborator

@abetomo abetomo left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Good catch!

@shadowspawn shadowspawn added the pending release Merged into a branch for a future release, but not released yet label Jul 25, 2020
@shadowspawn shadowspawn merged commit b915706 into tj:develop Jul 25, 2020
@michga michga deleted the patch-1 branch July 25, 2020 09:38
@shadowspawn shadowspawn added this to the v6.1.0 milestone Aug 5, 2020
@shadowspawn shadowspawn removed the pending release Merged into a branch for a future release, but not released yet label Aug 28, 2020
@shadowspawn
Copy link
Collaborator

Released in Commander v6.1
https://github.com/tj/commander.js/releases/tag/v6.1.0

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.

None yet

3 participants