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: improve crypto.setEngine coverage to check for errors #11143

Closed
wants to merge 1 commit into from

Conversation

seppevs
Copy link
Contributor

@seppevs seppevs commented Feb 3, 2017

test: improve crypto.setEngine test coverage to check for errors

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)

N/A

@nodejs-github-bot nodejs-github-bot added the test Issues and PRs related to the tests. label Feb 3, 2017
@hiroppy hiroppy added the crypto Issues and PRs related to the crypto subsystem. label Feb 3, 2017
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 a green CI & linter

}, /"id" argument should be a string/);

assert.throws(function() {
crypto.setEngine('/path/to/engine', 'notANumber')
Copy link
Member

Choose a reason for hiding this comment

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

Does the linter pass with these (make lint)? We do use semicolons to end statements 😄


assert.throws(function() {
crypto.setEngine(true)
}, /"id" argument should be a string/);
Copy link
Member

Choose a reason for hiding this comment

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

You can write /^TypeError: "id" argument should be a string$/ :)

@seppevs seppevs force-pushed the test_crypto_engine branch 2 times, most recently from 5618f04 to d9121e9 Compare February 3, 2017 09:54
@seppevs
Copy link
Contributor Author

seppevs commented Feb 3, 2017

I did the changes:

  • All statements end with a semicolon
  • I check for TypeError in both tests now

I amended the changes to the previous commit.

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.

@seppevs seppevs force-pushed the test_crypto_engine branch from d9121e9 to a82e13d Compare February 3, 2017 10:07
@gibfahn
Copy link
Member

gibfahn commented Feb 3, 2017

cc/ @nodejs/crypto @sam-github

@shigeki
Copy link
Contributor

shigeki commented Feb 3, 2017

This is duplicated to #10786 and related #10865. I'm now waiting for resolve nodejs/build#596.

jasnell pushed a commit that referenced this pull request Feb 7, 2017
PR-URL: #11143
Reviewed-By: Anna Henningsen <anna@addaleax.net>
Reviewed-By: Yuta Hiroto <hello@about-hiroppy.com>
Reviewed-By: James M Snell <jasnell@gmail.com>
@jasnell
Copy link
Member

jasnell commented Feb 7, 2017

Landed in ddbfdba

@jasnell jasnell closed this Feb 7, 2017
italoacasas pushed a commit to italoacasas/node that referenced this pull request Feb 9, 2017
PR-URL: nodejs#11143
Reviewed-By: Anna Henningsen <anna@addaleax.net>
Reviewed-By: Yuta Hiroto <hello@about-hiroppy.com>
Reviewed-By: James M Snell <jasnell@gmail.com>
italoacasas pushed a commit to italoacasas/node that referenced this pull request Feb 14, 2017
PR-URL: nodejs#11143
Reviewed-By: Anna Henningsen <anna@addaleax.net>
Reviewed-By: Yuta Hiroto <hello@about-hiroppy.com>
Reviewed-By: James M Snell <jasnell@gmail.com>
krydos pushed a commit to krydos/node that referenced this pull request Feb 25, 2017
PR-URL: nodejs#11143
Reviewed-By: Anna Henningsen <anna@addaleax.net>
Reviewed-By: Yuta Hiroto <hello@about-hiroppy.com>
Reviewed-By: James M Snell <jasnell@gmail.com>
jasnell pushed a commit that referenced this pull request Mar 7, 2017
PR-URL: #11143
Reviewed-By: Anna Henningsen <anna@addaleax.net>
Reviewed-By: Yuta Hiroto <hello@about-hiroppy.com>
Reviewed-By: James M Snell <jasnell@gmail.com>
@jasnell
Copy link
Member

jasnell commented Mar 7, 2017

Would require a backport PR to land on v4

MylesBorins pushed a commit that referenced this pull request Mar 9, 2017
PR-URL: #11143
Reviewed-By: Anna Henningsen <anna@addaleax.net>
Reviewed-By: Yuta Hiroto <hello@about-hiroppy.com>
Reviewed-By: James M Snell <jasnell@gmail.com>
@MylesBorins MylesBorins mentioned this pull request Mar 9, 2017
@shigeki shigeki mentioned this pull request Mar 25, 2017
3 tasks
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
crypto Issues and PRs related to the crypto subsystem. test Issues and PRs related to the tests.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

7 participants