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 N-API test coverage #13044

Closed
wants to merge 2 commits into from
Closed

Conversation

mhdawson
Copy link
Member

  • add coverage for napi_get_prototype
  • add coverage for napi_strict_equals

Continue to chip away at missing coverage in my spare time.

Instead of creating addons for each of these I combined
them into test_general as they did not seem naturally
group with other functions. I was thinking that we
want less rather than more test addons, as each one adds to
the overall build time. If there is general agreement
with that I might move some of the other existing tests
into test_general in cases were there is only 1 or 2
functions being tested in the existing grouping.

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, n-api

- add coverage for napi_get_prototype
- add coverage for napi_strict_equals
@nodejs-github-bot nodejs-github-bot added node-api Issues and PRs related to the Node-API. test Issues and PRs related to the tests. labels May 16, 2017
assert.strictEqual(test_general.testStrictEquals(val1, val2), false);
assert.ok(test_general.testStrictEquals(val2, val3));

// test napi_strict_equals
Copy link
Member

Choose a reason for hiding this comment

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

napi_get_prototype

@jasongin
Copy link
Member

If there is general agreement with that I might move some of the other existing tests into test_general in cases were there is only 1 or 2 functions being tested in the existing grouping.

Sounds good to me. I've certainly noticed how the build time is slowed by so many small test modules. It could be possible to put groups of tests in separate files in the same module, though that would require refactoring the init methods somewhat.

@mhdawson
Copy link
Member Author

@mhdawson
Copy link
Member Author

Landed as 0dd8b9a

@mhdawson mhdawson closed this May 17, 2017
mhdawson added a commit that referenced this pull request May 17, 2017
- add coverage for napi_get_prototype
- add coverage for napi_strict_equals

PR-URL: #13044
Reviewed-By: Colin Ihrig <[email protected]>
Reviewed-By: Jason Ginchereau <[email protected]>
anchnk pushed a commit to anchnk/node that referenced this pull request May 19, 2017
- add coverage for napi_get_prototype
- add coverage for napi_strict_equals

PR-URL: nodejs#13044
Reviewed-By: Colin Ihrig <[email protected]>
Reviewed-By: Jason Ginchereau <[email protected]>
@jasnell jasnell mentioned this pull request May 28, 2017
@mhdawson mhdawson deleted the napi-cov5 branch June 28, 2017 19:23
gabrielschulhof pushed a commit to gabrielschulhof/node that referenced this pull request Apr 10, 2018
- add coverage for napi_get_prototype
- add coverage for napi_strict_equals

PR-URL: nodejs#13044
Reviewed-By: Colin Ihrig <[email protected]>
Reviewed-By: Jason Ginchereau <[email protected]>
MylesBorins pushed a commit that referenced this pull request Apr 16, 2018
- add coverage for napi_get_prototype
- add coverage for napi_strict_equals

Backport-PR-URL: #19447
PR-URL: #13044
Reviewed-By: Colin Ihrig <[email protected]>
Reviewed-By: Jason Ginchereau <[email protected]>
@MylesBorins MylesBorins mentioned this pull request Apr 16, 2018
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
node-api Issues and PRs related to the Node-API. test Issues and PRs related to the tests.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants