Skip to content

Conversation

edsadr
Copy link
Member

@edsadr edsadr commented Dec 9, 2016

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

test

Description of change

use let and const instead of var
add missing common.mustCall for anonymous functions

@nodejs-github-bot nodejs-github-bot added test Issues and PRs related to the tests. lts-watch-v6.x labels Dec 9, 2016
@mscdex mscdex added the dns Issues and PRs related to the dns subsystem. label Dec 9, 2016
@mscdex
Copy link
Contributor

mscdex commented Dec 9, 2016

Can't we also get rid of the expected and completed variables now that we're using common.mustCall()?

Copy link
Contributor

Choose a reason for hiding this comment

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

Would you mind replacing all of these lines in the file with assert.ifError(err);

Copy link
Member Author

Choose a reason for hiding this comment

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

will perform these changes later tonight

@edsadr edsadr changed the title test: improve the code in test-dns-ipv4 test: refactor the code in test-dns-ipv4 Dec 10, 2016
@edsadr
Copy link
Member Author

edsadr commented Dec 10, 2016

@mscdex @cjihrig just applied the changes you requested

Copy link
Contributor

@mscdex mscdex Dec 10, 2016

Choose a reason for hiding this comment

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

I'd rather either see this indented or use an arrow function to keep it on the previous line. If you go the arrow function route, we should be more consistent though and use it for the other callbacks too.

Same goes for the other instances below.

Copy link
Contributor

Choose a reason for hiding this comment

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

common should be required before anything else.

Copy link
Member Author

Choose a reason for hiding this comment

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

will do this change too after get the #10219 approved, I am learning the right format for the code

* remove the manual control for functions execution
* use common.mustCall to control the functions execution automatically
* use let and const instead of var
* use assert.strictEqual instead assert.equal
@edsadr
Copy link
Member Author

edsadr commented Dec 20, 2016

changed the style to match the one agreed in #10219

@italoacasas
Copy link

@edsadr
Copy link
Member Author

edsadr commented Dec 23, 2016

any update on this one?

@julianduque
Copy link
Contributor

@italoacasas
Copy link

italoacasas commented Dec 23, 2016

landing this tomorrow if not objections @nodejs/collaboration

@gibfahn
Copy link
Member

gibfahn commented Dec 28, 2016

@italoacasas I think you meant @nodejs/collaborators

italoacasas pushed a commit that referenced this pull request Dec 28, 2016
* remove the manual control for functions execution
* use common.mustCall to control the functions execution automatically
* use let and const instead of var
* use assert.strictEqual instead assert.equal

PR-URL: #10200
Reviewed-By: Italo A. Casas <[email protected]>
Reviewed-By: Sakthipriyan Vairamani <[email protected]>
@italoacasas
Copy link

Landed 4d3b487

evanlucas pushed a commit that referenced this pull request Jan 3, 2017
* remove the manual control for functions execution
* use common.mustCall to control the functions execution automatically
* use let and const instead of var
* use assert.strictEqual instead assert.equal

PR-URL: #10200
Reviewed-By: Italo A. Casas <[email protected]>
Reviewed-By: Sakthipriyan Vairamani <[email protected]>
evanlucas pushed a commit that referenced this pull request Jan 4, 2017
* remove the manual control for functions execution
* use common.mustCall to control the functions execution automatically
* use let and const instead of var
* use assert.strictEqual instead assert.equal

PR-URL: #10200
Reviewed-By: Italo A. Casas <[email protected]>
Reviewed-By: Sakthipriyan Vairamani <[email protected]>
MylesBorins pushed a commit that referenced this pull request Jan 23, 2017
* remove the manual control for functions execution
* use common.mustCall to control the functions execution automatically
* use let and const instead of var
* use assert.strictEqual instead assert.equal

PR-URL: #10200
Reviewed-By: Italo A. Casas <[email protected]>
Reviewed-By: Sakthipriyan Vairamani <[email protected]>
MylesBorins pushed a commit that referenced this pull request Jan 24, 2017
* remove the manual control for functions execution
* use common.mustCall to control the functions execution automatically
* use let and const instead of var
* use assert.strictEqual instead assert.equal

PR-URL: #10200
Reviewed-By: Italo A. Casas <[email protected]>
Reviewed-By: Sakthipriyan Vairamani <[email protected]>
@MylesBorins MylesBorins mentioned this pull request Jan 24, 2017
MylesBorins pushed a commit that referenced this pull request Jan 31, 2017
* remove the manual control for functions execution
* use common.mustCall to control the functions execution automatically
* use let and const instead of var
* use assert.strictEqual instead assert.equal

PR-URL: #10200
Reviewed-By: Italo A. Casas <[email protected]>
Reviewed-By: Sakthipriyan Vairamani <[email protected]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

dns Issues and PRs related to the dns subsystem. test Issues and PRs related to the tests.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

10 participants