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: fix require nits in some test-tls-* tests #14008

Closed
wants to merge 1 commit into from
Closed

test: fix require nits in some test-tls-* tests #14008

wants to merge 1 commit into from

Conversation

vsemozhetbyt
Copy link
Contributor

@vsemozhetbyt vsemozhetbyt commented Jun 30, 2017

Checklist
  • make -j4 test (UNIX), or vcbuild test (Windows) passes
  • tests and/or benchmarks are included
  • commit message follows commit guidelines
Affected core subsystem(s)

test

  • Do not require if test is skipped.
  • Do not re-require without need.
  • Sort requiring by module names.

I've just stumble upon these nits in these connected tests by chance. Maybe I shall try to fix this class of nits in tests more thoroughly later if this makes any sense.

* Do not require if test is skipped.
* Do not re-require without need.
* Sort requiring by module names.
@nodejs-github-bot nodejs-github-bot added the test Issues and PRs related to the tests. label Jun 30, 2017
@vsemozhetbyt
Copy link
Contributor Author

vsemozhetbyt commented Jun 30, 2017

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

All fails seem unrelated.


const assert = require('assert');
const { spawn } = require('child_process');
Copy link
Member

Choose a reason for hiding this comment

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

At the moment, the test writing guide says:

The require statements are sorted in ASCII order (digits, upper case, _, lower case).

It's not clear to me if this refers to the variable names or the module names. Thoughts?

Copy link
Contributor

Choose a reason for hiding this comment

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

@sam-github? Ref: 02b9270

Since the whole paragraph's subject is modules, my intuition says sort by module name.
(also congruent with Jewish law that states you bless food according to the main ingredient and not by how you eat it 😉)

Copy link
Contributor Author

Choose a reason for hiding this comment

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

FWIW, I think module name sorting would be more consistent here, as we can use many variable names in destructuring and only one module name. See examples.

@refack
Copy link
Contributor

refack commented Jun 30, 2017

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

All fails seem unrelated.

#14014
#14015

@vsemozhetbyt
Copy link
Contributor Author

vsemozhetbyt commented Jul 3, 2017

@vsemozhetbyt
Copy link
Contributor Author

Landed in cc1a47d

@vsemozhetbyt vsemozhetbyt deleted the test-tls branch July 4, 2017 01:06
vsemozhetbyt added a commit that referenced this pull request Jul 4, 2017
* Do not require if test is skipped.
* Do not re-require without need.
* Sort requiring by module names.

PR-URL: #14008
Reviewed-By: Refael Ackermann <[email protected]>
Reviewed-By: Colin Ihrig <[email protected]>
addaleax pushed a commit that referenced this pull request Jul 11, 2017
* Do not require if test is skipped.
* Do not re-require without need.
* Sort requiring by module names.

PR-URL: #14008
Reviewed-By: Refael Ackermann <[email protected]>
Reviewed-By: Colin Ihrig <[email protected]>
@addaleax addaleax mentioned this pull request Jul 11, 2017
addaleax pushed a commit that referenced this pull request Jul 18, 2017
* Do not require if test is skipped.
* Do not re-require without need.
* Sort requiring by module names.

PR-URL: #14008
Reviewed-By: Refael Ackermann <[email protected]>
Reviewed-By: Colin Ihrig <[email protected]>
Fishrock123 pushed a commit that referenced this pull request Jul 19, 2017
* Do not require if test is skipped.
* Do not re-require without need.
* Sort requiring by module names.

PR-URL: #14008
Reviewed-By: Refael Ackermann <[email protected]>
Reviewed-By: Colin Ihrig <[email protected]>
MylesBorins pushed a commit that referenced this pull request Aug 15, 2017
* Do not require if test is skipped.
* Do not re-require without need.
* Sort requiring by module names.

PR-URL: #14008
Reviewed-By: Refael Ackermann <[email protected]>
Reviewed-By: Colin Ihrig <[email protected]>
MylesBorins pushed a commit that referenced this pull request Aug 15, 2017
* Do not require if test is skipped.
* Do not re-require without need.
* Sort requiring by module names.

PR-URL: #14008
Reviewed-By: Refael Ackermann <[email protected]>
Reviewed-By: Colin Ihrig <[email protected]>
MylesBorins pushed a commit that referenced this pull request Aug 16, 2017
* Do not require if test is skipped.
* Do not re-require without need.
* Sort requiring by module names.

PR-URL: #14008
Reviewed-By: Refael Ackermann <[email protected]>
Reviewed-By: Colin Ihrig <[email protected]>
@MylesBorins MylesBorins mentioned this pull request Aug 16, 2017
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.

6 participants