Skip to content

Tests of deprecated features should not print warnings #150

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

Closed
kadler opened this issue Mar 12, 2020 · 2 comments · May be fixed by #293
Closed

Tests of deprecated features should not print warnings #150

kadler opened this issue Mar 12, 2020 · 2 comments · May be fixed by #293
Labels
enhancement New feature or request good first issue Good for newcomers help wanted Extra attention is needed keep-open Exempts stale action from auto closing the issue/pr. stale
Milestone

Comments

@kadler
Copy link
Member

kadler commented Mar 12, 2020

Is your feature request related to a problem? Please describe.
When running tests in the unit/deprecated directory, deprecation warnings are output. Obviously we know they're deprecated, but we need to ensure that the deprecated functions work the same as they used to for compatibility.

Describe the solution you'd like
Deprecated tests should catch or silence the deprecation warnings. Ideally, tests cases will also ensure that the deprecated functions emit a deprecation warning.

Describe alternatives you've considered
Ignore the output?

@kadler kadler added the enhancement New feature or request label Mar 12, 2020
@kadler
Copy link
Member Author

kadler commented Mar 12, 2020

Looks like tests could add an event listener for process.on('deprecation', ...) and either ignore the deprecation or validate it. https://www.npmjs.com/package/depd#processondeprecation-fn

After the test case has finished, it should unregister the listener before returning.

@kadler kadler added this to the Version 1.1 milestone Mar 12, 2020
@kadler kadler added good first issue Good for newcomers help wanted Extra attention is needed labels Mar 12, 2020
@github-actions
Copy link

👋 Hi! This issue 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 Apr 12, 2020
@abmusse abmusse added the keep-open Exempts stale action from auto closing the issue/pr. label Apr 12, 2020
@github-actions github-actions bot closed this as completed Oct 6, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request good first issue Good for newcomers help wanted Extra attention is needed keep-open Exempts stale action from auto closing the issue/pr. stale
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants