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: add expectDeprecationWarning to common #8662

Closed
wants to merge 1 commit into from

Conversation

targos
Copy link
Member

@targos targos commented Sep 20, 2016

Checklist
  • make -j4 test (UNIX), or vcbuild test nosign (Windows) passes
  • commit message follows commit guidelines
Affected core subsystem(s)

test

Description of change

There are multiple tests that use the same boilerplate to test that
deprecation warnings are correctly emmited. This adds a new common
function to do that and changes the tests to use it.

/cc @nodejs/testing @addaleax

@targos targos added the test Issues and PRs related to the tests. label Sep 20, 2016
@nodejs-github-bot nodejs-github-bot added the test Issues and PRs related to the tests. label Sep 20, 2016
@mscdex
Copy link
Contributor

mscdex commented Sep 20, 2016

Minor nit: typo in commit message: s/emmited/emitted/

@targos targos force-pushed the test-common-deprecation branch from aa65c45 to 12975d8 Compare September 20, 2016 08:25
@targos
Copy link
Member Author

targos commented Sep 20, 2016

@targos targos force-pushed the test-common-deprecation branch from 12975d8 to 6400559 Compare September 20, 2016 10:47
@targos
Copy link
Member Author

targos commented Sep 20, 2016

@addaleax I forgot about your comment in #8633 (comment). Changed to use assert.ok and .includes().

CI: https://ci.nodejs.org/job/node-test-pull-request/4149/

@addaleax
Copy link
Member

Oh, right. Still LGTM!

@benjamingr
Copy link
Member

LGTM

@Trott
Copy link
Member

Trott commented Sep 20, 2016

LGTM if there are no surprises in CI

Copy link
Member

@jasnell jasnell left a comment

Choose a reason for hiding this comment

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

LGTM!

Copy link
Contributor

@cjihrig cjihrig left a comment

Choose a reason for hiding this comment

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

LGTM

One suggestion. Since we've been getting a little warning-happy lately, perhaps this function should be expectWarning() with the name as an argument.

@targos
Copy link
Member Author

targos commented Sep 22, 2016

I made the suggested change from @cjihrig.

CI: https://ci.nodejs.org/job/node-test-pull-request/4205/

@jasnell
Copy link
Member

jasnell commented Sep 24, 2016

I think this works for now. We'll want to be careful in the case where a particular code path expects multiple warnings, but that's a change we can make later as it becomes necessary.

@targos
Copy link
Member Author

targos commented Sep 24, 2016

There are multiple tests that use the same boilerplate to test that
warnings are correctly emitted. This adds a new common function to do that
and changes the tests to use it.

PR-URL: nodejs#8662
Reviewed-By: Anna Henningsen <anna@addaleax.net>
Reviewed-By: Benjamin Gruenbaum <benjamingr@gmail.com>
Reviewed-By: Rich Trott <rtrott@gmail.com>
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
Reviewed-By: James M Snell <jasnell@gmail.com>
@targos targos force-pushed the test-common-deprecation branch from a2668a9 to fb651d3 Compare September 24, 2016 06:56
targos added a commit that referenced this pull request Sep 24, 2016
There are multiple tests that use the same boilerplate to test that
warnings are correctly emitted. This adds a new common function to do that
and changes the tests to use it.

PR-URL: #8662
Reviewed-By: Anna Henningsen <anna@addaleax.net>
Reviewed-By: Benjamin Gruenbaum <benjamingr@gmail.com>
Reviewed-By: Rich Trott <rtrott@gmail.com>
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
Reviewed-By: James M Snell <jasnell@gmail.com>
@targos
Copy link
Member Author

targos commented Sep 24, 2016

Landed in 43e1ca8

@targos targos closed this Sep 24, 2016
@targos targos deleted the test-common-deprecation branch September 24, 2016 15:24
jasnell pushed a commit that referenced this pull request Sep 29, 2016
There are multiple tests that use the same boilerplate to test that
warnings are correctly emitted. This adds a new common function to do that
and changes the tests to use it.

PR-URL: #8662
Reviewed-By: Anna Henningsen <anna@addaleax.net>
Reviewed-By: Benjamin Gruenbaum <benjamingr@gmail.com>
Reviewed-By: Rich Trott <rtrott@gmail.com>
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
Reviewed-By: James M Snell <jasnell@gmail.com>
geek pushed a commit to geek/node that referenced this pull request Sep 30, 2016
There are multiple tests that use the same boilerplate to test that
warnings are correctly emitted. This adds a new common function to do that
and changes the tests to use it.

PR-URL: nodejs#8662
Reviewed-By: Anna Henningsen <anna@addaleax.net>
Reviewed-By: Benjamin Gruenbaum <benjamingr@gmail.com>
Reviewed-By: Rich Trott <rtrott@gmail.com>
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
Reviewed-By: James M Snell <jasnell@gmail.com>
Fishrock123 pushed a commit that referenced this pull request Oct 11, 2016
There are multiple tests that use the same boilerplate to test that
warnings are correctly emitted. This adds a new common function to do that
and changes the tests to use it.

PR-URL: #8662
Reviewed-By: Anna Henningsen <anna@addaleax.net>
Reviewed-By: Benjamin Gruenbaum <benjamingr@gmail.com>
Reviewed-By: Rich Trott <rtrott@gmail.com>
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
Reviewed-By: James M Snell <jasnell@gmail.com>

 Conflicts:
	test/parallel/test-buffer-deprecated.js
	test/parallel/test-repl-deprecated.js
MylesBorins pushed a commit that referenced this pull request Dec 21, 2016
There are multiple tests that use the same boilerplate to test that
warnings are correctly emitted. This adds a new common function to do that
and changes the tests to use it.

PR-URL: #8662
Reviewed-By: Anna Henningsen <anna@addaleax.net>
Reviewed-By: Benjamin Gruenbaum <benjamingr@gmail.com>
Reviewed-By: Rich Trott <rtrott@gmail.com>
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
Reviewed-By: James M Snell <jasnell@gmail.com>
MylesBorins pushed a commit that referenced this pull request Dec 21, 2016
There are multiple tests that use the same boilerplate to test that
warnings are correctly emitted. This adds a new common function to do that
and changes the tests to use it.

PR-URL: #8662
Reviewed-By: Anna Henningsen <anna@addaleax.net>
Reviewed-By: Benjamin Gruenbaum <benjamingr@gmail.com>
Reviewed-By: Rich Trott <rtrott@gmail.com>
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
Reviewed-By: James M Snell <jasnell@gmail.com>
MylesBorins pushed a commit that referenced this pull request Dec 21, 2016
There are multiple tests that use the same boilerplate to test that
warnings are correctly emitted. This adds a new common function to do that
and changes the tests to use it.

PR-URL: #8662
Reviewed-By: Anna Henningsen <anna@addaleax.net>
Reviewed-By: Benjamin Gruenbaum <benjamingr@gmail.com>
Reviewed-By: Rich Trott <rtrott@gmail.com>
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
Reviewed-By: James M Snell <jasnell@gmail.com>
@MylesBorins MylesBorins mentioned this pull request Dec 21, 2016
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
test Issues and PRs related to the tests.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

9 participants