FazBrowse GitHub Viewer | Trending |
URL:
| Home
Tools: [Download Repo ZIP]   [Original HTTPS Page]

doc: edit writing-tests.md by Trott · Pull Request #10585 · nodejs/node · GitHub

/ node Public

doc: edit writing-tests.md - #10585

Closed
Trott wants to merge 2 commits into
nodejs:masterfrom
Trott:writing-tests
Closed

doc: edit writing-tests.md#10585
Trott wants to merge 2 commits into
nodejs:masterfrom
Trott:writing-tests

Conversation

Trott commented Jan 3, 2017

Copy link
Copy Markdown
Member
  • Remove passive voice
  • Remove unneeded modifiers
  • Minor comma change
Checklist
  • documentation is changed or added
  • commit message follows commit guidelines
Affected core subsystem(s)

doc test

Trott added doc Issues and PRs related to the documentations. test Issues and PRs related to the tests. labels Jan 3, 2017
nodejs-github-bot added the doc Issues and PRs related to the documentations. label Jan 3, 2017
Comment thread doc/guides/writing-tests.md Outdated

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

Choose a reason Spam Abuse Off Topic Outdated Duplicate Resolved Low Quality

Why the passive->active change here? Is this a general rule we follow? I find if there are variables leaked into the global space less clear than if variables are leaked into the global space.

Trott Jan 8, 2017
edited
Loading

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

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

Choose a reason Spam Abuse Off Topic Outdated Duplicate Resolved Low Quality

How about if the test leaks variables into the global space?

The passive->active change is just following a general writing recommendation for increased clarity, but of course we should stick to passive voice if changing to active does not increase clarity. :-D

gibfahn left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

Choose a reason Spam Abuse Off Topic Outdated Duplicate Resolved Low Quality

LGTM with nit

Comment thread doc/guides/writing-tests.md Outdated

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

Choose a reason Spam Abuse Off Topic Outdated Duplicate Resolved Low Quality

4-seconds->4-second

Comment thread doc/guides/writing-tests.md Outdated

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Choose a reason Spam Abuse Off Topic Outdated Duplicate Resolved Low Quality

"include the common module, as the first executable statement" maybe?

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

Choose a reason Spam Abuse Off Topic Outdated Duplicate Resolved Low Quality

Or maybe to be really clear just say that the first two lines of the test must be:

'use strict';
const common = require('../common');

or

'use strict';
require('../common');

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Choose a reason Spam Abuse Off Topic Outdated Duplicate Resolved Low Quality

Generally, this holds good. But in some tests we have comments at the beginning (I mean before common) and that is also acceptable.

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

Choose a reason Spam Abuse Off Topic Outdated Duplicate Resolved Low Quality

Is there a reason we couldn't just standardise on what's in this guide?

'use strict';
require('../common');

// Comments after this

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

Choose a reason Spam Abuse Off Topic Outdated Duplicate Resolved Low Quality

If we did that we could lint for it.

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Choose a reason Spam Abuse Off Topic Outdated Duplicate Resolved Low Quality

Lets see what @Trott thinks about it.

Trott Jan 11, 2017
edited
Loading

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

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

Choose a reason Spam Abuse Off Topic Outdated Duplicate Resolved Low Quality

How about include the common module before any other modules. as a reasonable concise compromise that we can expand on later if it is found to be inadequate?

jasnell commented Jan 6, 2017

Copy link
Copy Markdown
Member

Ping @Trott

Trott commented Jan 11, 2017

Copy link
Copy Markdown
Member Author

Nits addressed, I think.

Trott added 2 commits January 11, 2017 16:02
* Remove passive voice
* Remove unneeded modifiers
* Minor comma change
Trott added a commit to Trott/io.js that referenced this pull request Jan 12, 2017
* Remove passive voice
* Remove unneeded modifiers
* Minor comma change

PR-URL: nodejs#10585
Reviewed-By: Gibson Fahnestock <gibfahn@gmail.com>
Reviewed-By: Italo A. Casas <me@italoacasas.com>

Trott commented Jan 12, 2017

Copy link
Copy Markdown
Member Author

Landed in 0674789

Trott closed this Jan 12, 2017
italoacasas pushed a commit to italoacasas/node that referenced this pull request Jan 18, 2017
* Remove passive voice
* Remove unneeded modifiers
* Minor comma change

PR-URL: nodejs#10585
Reviewed-By: Gibson Fahnestock <gibfahn@gmail.com>
Reviewed-By: Italo A. Casas <me@italoacasas.com>
italoacasas pushed a commit to italoacasas/node that referenced this pull request Jan 23, 2017
* Remove passive voice
* Remove unneeded modifiers
* Minor comma change

PR-URL: nodejs#10585
Reviewed-By: Gibson Fahnestock <gibfahn@gmail.com>
Reviewed-By: Italo A. Casas <me@italoacasas.com>
italoacasas pushed a commit to italoacasas/node that referenced this pull request Jan 24, 2017
* Remove passive voice
* Remove unneeded modifiers
* Minor comma change

PR-URL: nodejs#10585
Reviewed-By: Gibson Fahnestock <gibfahn@gmail.com>
Reviewed-By: Italo A. Casas <me@italoacasas.com>
italoacasas pushed a commit to italoacasas/node that referenced this pull request Jan 27, 2017
* Remove passive voice
* Remove unneeded modifiers
* Minor comma change

PR-URL: nodejs#10585
Reviewed-By: Gibson Fahnestock <gibfahn@gmail.com>
Reviewed-By: Italo A. Casas <me@italoacasas.com>
italoacasas mentioned this pull request Jan 29, 2017
MylesBorins pushed a commit that referenced this pull request Mar 7, 2017
* Remove passive voice
* Remove unneeded modifiers
* Minor comma change

PR-URL: #10585
Reviewed-By: Gibson Fahnestock <gibfahn@gmail.com>
Reviewed-By: Italo A. Casas <me@italoacasas.com>
MylesBorins pushed a commit that referenced this pull request Mar 9, 2017
* Remove passive voice
* Remove unneeded modifiers
* Minor comma change

PR-URL: #10585
Reviewed-By: Gibson Fahnestock <gibfahn@gmail.com>
Reviewed-By: Italo A. Casas <me@italoacasas.com>
MylesBorins mentioned this pull request Mar 9, 2017
Trott deleted the writing-tests branch January 13, 2022 22:45
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode characters
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

doc Issues and PRs related to the documentations. test Issues and PRs related to the tests.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

8 participants


Back | FazBrowse Home | New Git URL