Skip to content

Conversation

@targos
Copy link
Member

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

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

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

@targostargosforce-pushed the test-common-deprecation branch from aa65c45 to 12975d8CompareSeptember 20, 2016 08:25
@targos
Copy link
MemberAuthor

@targostargosforce-pushed the test-common-deprecation branch from 12975d8 to 6400559CompareSeptember 20, 2016 10:47
@targos
Copy link
MemberAuthor

@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

LGTM if there are no surprises in CI

Copy link
Member

@jasnelljasnell 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

@cjihrigcjihrig 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
MemberAuthor

I made the suggested change from @cjihrig.

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

@jasnell
Copy link
Member

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
MemberAuthor

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 <[email protected]> Reviewed-By: Benjamin Gruenbaum <[email protected]> Reviewed-By: Rich Trott <[email protected]> Reviewed-By: Colin Ihrig <[email protected]> Reviewed-By: James M Snell <[email protected]>
@targostargosforce-pushed the test-common-deprecation branch from a2668a9 to fb651d3CompareSeptember 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 <[email protected]> Reviewed-By: Benjamin Gruenbaum <[email protected]> Reviewed-By: Rich Trott <[email protected]> Reviewed-By: Colin Ihrig <[email protected]> Reviewed-By: James M Snell <[email protected]>
@targos
Copy link
MemberAuthor

Landed in 43e1ca8

@targostargos closed this Sep 24, 2016
@targostargos 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 <[email protected]> Reviewed-By: Benjamin Gruenbaum <[email protected]> Reviewed-By: Rich Trott <[email protected]> Reviewed-By: Colin Ihrig <[email protected]> Reviewed-By: James M Snell <[email protected]>
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 <[email protected]> Reviewed-By: Benjamin Gruenbaum <[email protected]> Reviewed-By: Rich Trott <[email protected]> Reviewed-By: Colin Ihrig <[email protected]> Reviewed-By: James M Snell <[email protected]>
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 <[email protected]> Reviewed-By: Benjamin Gruenbaum <[email protected]> Reviewed-By: Rich Trott <[email protected]> Reviewed-By: Colin Ihrig <[email protected]> Reviewed-By: James M Snell <[email protected]> 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 <[email protected]> Reviewed-By: Benjamin Gruenbaum <[email protected]> Reviewed-By: Rich Trott <[email protected]> Reviewed-By: Colin Ihrig <[email protected]> Reviewed-By: James M Snell <[email protected]>
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 <[email protected]> Reviewed-By: Benjamin Gruenbaum <[email protected]> Reviewed-By: Rich Trott <[email protected]> Reviewed-By: Colin Ihrig <[email protected]> Reviewed-By: James M Snell <[email protected]>
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 <[email protected]> Reviewed-By: Benjamin Gruenbaum <[email protected]> Reviewed-By: Rich Trott <[email protected]> Reviewed-By: Colin Ihrig <[email protected]> Reviewed-By: James M Snell <[email protected]>
@MylesBorinsMylesBorins mentioned this pull request Dec 21, 2016
Sign up for freeto join this conversation on GitHub. Already have an account? Sign in to comment

Labels

testIssues and PRs related to the tests.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

9 participants

@targos@mscdex@addaleax@benjamingr@Trott@jasnell@cjihrig@MylesBorins@nodejs-github-bot