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: increase readfile abort coverage #36429

Merged
merged 1 commit into from Dec 10, 2020
Merged

Conversation

Copy link
Contributor

@shootermv shootermv commented Dec 7, 2020

No description provided.

@nodejs-github-bot nodejs-github-bot added the test label Dec 7, 2020
@benjamingr
Copy link
Member

@benjamingr benjamingr commented Dec 7, 2020

Hey thanks for this. Please run make lint and fix the linting error :] You can also see the linter output here https://github.com/nodejs/node/pull/36429/files

{
// Verify that the if something different than Abortcontroller.signal is passed - ERR_INVALID_ARG_TYPE is thrown
assert.throws(() => {
const callback = () => {};
Copy link
Member

@benjamingr benjamingr Dec 7, 2020

Choose a reason for hiding this comment

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

Suggested change
const callback = () => {};
const callback = common.mustNotCall();

@@ -59,3 +59,14 @@ const execOpts = { encoding: 'utf8', shell: true };
execFile(process.execPath, [echoFixture, 0], { signal }, callback);
ac.abort();
}

{
// Verify that the if something different than Abortcontroller.signal is passed - ERR_INVALID_ARG_TYPE is thrown
Copy link
Member

@benjamingr benjamingr Dec 7, 2020

Choose a reason for hiding this comment

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

Please keep the capitalization: I'd do something like:

Suggested change
// Verify that the if something different than Abortcontroller.signal is passed - ERR_INVALID_ARG_TYPE is thrown
// Verify that passing a non-signal to execFile throws an ERR_INVALID_ARG_TYPE

@shootermv shootermv changed the title test: incorrect param should throw TypeError test: increase readfile abort converage Dec 7, 2020
@shootermv shootermv changed the title test: increase readfile abort converage test: increase readfile abort coverage Dec 7, 2020
@shootermv shootermv force-pushed the add-readfile-test branch 2 times, most recently from b4b387e to 29898e6 Compare Dec 7, 2020
Copy link
Member

@benjamingr benjamingr left a comment

Thanks! 🙏

@benjamingr benjamingr added the request-ci label Dec 7, 2020
@github-actions github-actions bot removed the request-ci label Dec 7, 2020
@nodejs-github-bot
Copy link
Contributor

@nodejs-github-bot nodejs-github-bot commented Dec 7, 2020

@benjamingr benjamingr added commit-queue and removed commit-queue labels Dec 9, 2020
@Trott
Copy link
Member

@Trott Trott commented Dec 10, 2020

The commit message says readFile but it should be execFile I think?

Verify that if something different than Abortcontroller.signal is passed
to child_process.execFile(), ERR_INVALID_ARG_TYPE is thrown.

PR-URL: nodejs#36429
Reviewed-By: Benjamin Gruenbaum <benjamingr@gmail.com>
Reviewed-By: Rich Trott <rtrott@gmail.com>
@Trott Trott merged commit 5dd58d0 into nodejs:master Dec 10, 2020
30 checks passed
@Trott
Copy link
Member

@Trott Trott commented Dec 10, 2020

Landed in 5dd58d0.

Thanks for the contribution! 🎉

targos pushed a commit that referenced this issue Dec 21, 2020
Verify that if something different than Abortcontroller.signal is passed
to child_process.execFile(), ERR_INVALID_ARG_TYPE is thrown.

PR-URL: #36429
Reviewed-By: Benjamin Gruenbaum <benjamingr@gmail.com>
Reviewed-By: Rich Trott <rtrott@gmail.com>
@targos targos added the backport-open-v14.x label Apr 24, 2021
targos pushed a commit to targos/node that referenced this issue Apr 24, 2021
Verify that if something different than Abortcontroller.signal is passed
to child_process.execFile(), ERR_INVALID_ARG_TYPE is thrown.

PR-URL: nodejs#36429
Reviewed-By: Benjamin Gruenbaum <benjamingr@gmail.com>
Reviewed-By: Rich Trott <rtrott@gmail.com>
targos pushed a commit to targos/node that referenced this issue Apr 26, 2021
Verify that if something different than Abortcontroller.signal is passed
to child_process.execFile(), ERR_INVALID_ARG_TYPE is thrown.

PR-URL: nodejs#36429
Reviewed-By: Benjamin Gruenbaum <benjamingr@gmail.com>
Reviewed-By: Rich Trott <rtrott@gmail.com>
targos pushed a commit to targos/node that referenced this issue Apr 30, 2021
Verify that if something different than Abortcontroller.signal is passed
to child_process.execFile(), ERR_INVALID_ARG_TYPE is thrown.

PR-URL: nodejs#36429
Reviewed-By: Benjamin Gruenbaum <benjamingr@gmail.com>
Reviewed-By: Rich Trott <rtrott@gmail.com>
targos pushed a commit that referenced this issue Apr 30, 2021
Verify that if something different than Abortcontroller.signal is passed
to child_process.execFile(), ERR_INVALID_ARG_TYPE is thrown.

PR-URL: #36429
Backport-PR-URL: #38386
Reviewed-By: Benjamin Gruenbaum <benjamingr@gmail.com>
Reviewed-By: Rich Trott <rtrott@gmail.com>
@targos targos added backported-to-v14.x and removed backport-open-v14.x labels Apr 30, 2021
@danielleadams danielleadams mentioned this pull request May 3, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
backported-to-v14.x test
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

5 participants