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: refactor test-init.js #10384

Closed
wants to merge 1 commit into from

Conversation

thefourtheye
Copy link
Contributor

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

Description of change
  1. Lot of repeating code has been refactored to a function
  2. Errors in async calls are properly asserted
  3. Fail the test if the callbacks are not fired

@nodejs-github-bot nodejs-github-bot added test Issues and PRs related to the tests. lts-watch-v6.x labels Dec 21, 2016
Copy link
Member

@addaleax addaleax left a comment

Choose a reason for hiding this comment

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

LGTM with 2 suggestions

}));
}

{
// change CWD as we do this test so its not dependant on current CWD
Copy link
Member

Choose a reason for hiding this comment

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

typos: it’s and dependent (unrelated to this PR, but while you’re here… ;))

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Done!

}

// Setup environment. Make a copy of `process.env` and add `TEST_INIT`
const env = JSON.parse(JSON.stringify(process.env));
Copy link
Member

Choose a reason for hiding this comment

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

I may be wrong but from the looks of it the copying is kind of pointless?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Ack.

1. Lot of repeating code has been refactored to a function
2. Errors in async calls are properly asserted
3. Fail the test if the callbacks are not fired
@mscdex mscdex added the module Issues and PRs related to the module subsystem. label Dec 21, 2016
@julianduque
Copy link
Contributor

@julianduque
Copy link
Contributor

Landed in bf2c49c

julianduque pushed a commit that referenced this pull request Dec 23, 2016
1. Lot of repeating code has been refactored to a function
2. Errors in async calls are properly asserted
3. Fail the test if the callbacks are not fired

PR-URL: #10384
Reviewed-By: James M Snell <jasnell@gmail.com>
Reviewed-By: Anna Henningsen <anna@addaleax.net>
Reviewed-By: Julian Duque <julianduquej@gmail.com>
@thefourtheye thefourtheye deleted the refactor-test-init branch December 23, 2016 13:31
evanlucas pushed a commit that referenced this pull request Jan 3, 2017
1. Lot of repeating code has been refactored to a function
2. Errors in async calls are properly asserted
3. Fail the test if the callbacks are not fired

PR-URL: #10384
Reviewed-By: James M Snell <jasnell@gmail.com>
Reviewed-By: Anna Henningsen <anna@addaleax.net>
Reviewed-By: Julian Duque <julianduquej@gmail.com>
evanlucas pushed a commit that referenced this pull request Jan 4, 2017
1. Lot of repeating code has been refactored to a function
2. Errors in async calls are properly asserted
3. Fail the test if the callbacks are not fired

PR-URL: #10384
Reviewed-By: James M Snell <jasnell@gmail.com>
Reviewed-By: Anna Henningsen <anna@addaleax.net>
Reviewed-By: Julian Duque <julianduquej@gmail.com>
MylesBorins pushed a commit that referenced this pull request Jan 23, 2017
1. Lot of repeating code has been refactored to a function
2. Errors in async calls are properly asserted
3. Fail the test if the callbacks are not fired

PR-URL: #10384
Reviewed-By: James M Snell <jasnell@gmail.com>
Reviewed-By: Anna Henningsen <anna@addaleax.net>
Reviewed-By: Julian Duque <julianduquej@gmail.com>
MylesBorins pushed a commit that referenced this pull request Jan 24, 2017
1. Lot of repeating code has been refactored to a function
2. Errors in async calls are properly asserted
3. Fail the test if the callbacks are not fired

PR-URL: #10384
Reviewed-By: James M Snell <jasnell@gmail.com>
Reviewed-By: Anna Henningsen <anna@addaleax.net>
Reviewed-By: Julian Duque <julianduquej@gmail.com>
@MylesBorins MylesBorins mentioned this pull request Jan 24, 2017
MylesBorins pushed a commit that referenced this pull request Jan 31, 2017
1. Lot of repeating code has been refactored to a function
2. Errors in async calls are properly asserted
3. Fail the test if the callbacks are not fired

PR-URL: #10384
Reviewed-By: James M Snell <jasnell@gmail.com>
Reviewed-By: Anna Henningsen <anna@addaleax.net>
Reviewed-By: Julian Duque <julianduquej@gmail.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
module Issues and PRs related to the module subsystem. test Issues and PRs related to the tests.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

7 participants