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

Conversation

@mhdawson
Copy link
Member

commented May 16, 2017

  • 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

test: Improve N-API test coverage
- add coverage for napi_get_prototype
- add coverage for napi_strict_equals
assert.strictEqual(test_general.testStrictEquals(val1, val2), false);
assert.ok(test_general.testStrictEquals(val2, val3));

// test napi_strict_equals

This comment has been minimized.

Copy link
@jasongin

jasongin May 16, 2017

Contributor

napi_get_prototype

@jasongin

This comment has been minimized.

Copy link
Contributor

commented May 16, 2017

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

This comment has been minimized.

Copy link
Member Author

commented May 17, 2017

@mhdawson

This comment has been minimized.

Copy link
Member Author

commented May 17, 2017

Landed as 0dd8b9a

@mhdawson mhdawson closed this May 17, 2017

mhdawson added a commit that referenced this pull request May 17, 2017
test: Improve N-API test coverage
- add coverage for napi_get_prototype
- add coverage for napi_strict_equals

PR-URL: #13044
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
Reviewed-By: Jason Ginchereau <jasongin@microsoft.com>
anchnk pushed a commit to anchnk/node that referenced this pull request May 19, 2017
test: Improve N-API test coverage
- add coverage for napi_get_prototype
- add coverage for napi_strict_equals

PR-URL: nodejs#13044
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
Reviewed-By: Jason Ginchereau <jasongin@microsoft.com>
@jasnell jasnell referenced this pull request May 28, 2017

@mhdawson mhdawson deleted the mhdawson:napi-cov5 branch Jun 28, 2017

gabrielschulhof added a commit to gabrielschulhof/node that referenced this pull request Mar 12, 2018
test: Improve N-API test coverage
- add coverage for napi_get_prototype
- add coverage for napi_strict_equals

PR-URL: nodejs#13044
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
Reviewed-By: Jason Ginchereau <jasongin@microsoft.com>
gabrielschulhof added a commit to gabrielschulhof/node that referenced this pull request Mar 31, 2018
test: Improve N-API test coverage
- add coverage for napi_get_prototype
- add coverage for napi_strict_equals

PR-URL: nodejs#13044
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
Reviewed-By: Jason Ginchereau <jasongin@microsoft.com>
gabrielschulhof added a commit to gabrielschulhof/node that referenced this pull request Apr 10, 2018
test: Improve N-API test coverage
- add coverage for napi_get_prototype
- add coverage for napi_strict_equals

PR-URL: nodejs#13044
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
Reviewed-By: Jason Ginchereau <jasongin@microsoft.com>
MylesBorins added a commit that referenced this pull request Apr 16, 2018
test: Improve N-API test coverage
- add coverage for napi_get_prototype
- add coverage for napi_strict_equals

Backport-PR-URL: #19447
PR-URL: #13044
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
Reviewed-By: Jason Ginchereau <jasongin@microsoft.com>
@MylesBorins MylesBorins referenced this pull request Apr 16, 2018
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
4 participants
You can’t perform that action at this time.