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

Conversation

shootermv
Copy link
Contributor

No description provided.

@nodejs-github-bot nodejs-github-bot added the test Issues and PRs related to the tests. label Dec 7, 2020
@benjamingr
Copy link
Member

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

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

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 December 7, 2020 17:23
Copy link
Member

@benjamingr benjamingr left a comment

Choose a reason for hiding this comment

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

Thanks! 🙏

@benjamingr benjamingr added the request-ci Add this label to start a Jenkins CI on a PR. label Dec 7, 2020
@github-actions github-actions bot removed the request-ci Add this label to start a Jenkins CI on a PR. label Dec 7, 2020
@nodejs-github-bot
Copy link
Collaborator

@benjamingr benjamingr added commit-queue Add this label to land a pull request using GitHub Actions. and removed commit-queue Add this label to land a pull request using GitHub Actions. labels Dec 9, 2020
@Trott
Copy link
Member

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
@Trott
Copy link
Member

Trott commented Dec 10, 2020

Landed in 5dd58d0.

Thanks for the contribution! 🎉

targos pushed a commit that referenced this pull request 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 pushed a commit to targos/node that referenced this pull request 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 pull request 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 pull request 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 pull request 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>
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.

None yet

5 participants