Skip to content

test: Mute deprecation warnings #293

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

Open
wants to merge 2 commits into
base: master
Choose a base branch
from
Open

Conversation

abmusse
Copy link
Member

@abmusse abmusse commented Jun 29, 2020

Mute deprecation warnings by capturing the deprecation event emitted by the process with:

process.on('deprecation', fn)

Within the test cases we ensure that the deprecated functions emit a deprecation warning.

Resolves #150

@abmusse abmusse force-pushed the tests-mute-dep-warnings branch from fc4f2d1 to 074678d Compare June 30, 2020 16:34
@abmusse abmusse requested a review from kadler June 30, 2020 16:35
@abmusse abmusse marked this pull request as ready for review June 30, 2020 16:35
@github-actions
Copy link

👋 Hi! This pull request has been marked stale due to inactivity. If no further activity occurs, it will automatically be closed.

@github-actions github-actions bot added the stale label Jul 31, 2020
@abmusse abmusse added the keep-open Exempts stale action from auto closing the issue/pr. label Aug 3, 2020
@github-actions github-actions bot closed this Oct 6, 2020
@kadler kadler removed the stale label Oct 6, 2020
@kadler kadler reopened this Oct 6, 2020
Comment on lines +53 to +55
const temp = deprecation;
deprecation = null;
return temp;
Copy link
Member

Choose a reason for hiding this comment

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

Do we have to worry about race conditions here? Can mocha run tests simultaneously?

Copy link
Member Author

@abmusse abmusse Oct 22, 2020

Choose a reason for hiding this comment

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

By default mocha runs test serially. So in step 12 it describes the flow of execution:
image

So I don't think there would be issue of tests running simultaneously unless we were using parallel mode

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
keep-open Exempts stale action from auto closing the issue/pr.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Tests of deprecated features should not print warnings
2 participants