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 test coverage for lib/zlib.js #9366

Closed
wants to merge 3 commits into from

Conversation

Trott
Copy link
Member

@Trott Trott commented Oct 30, 2016

Checklist
  • make -j8 test (UNIX), or vcbuild test nosign (Windows) passes
  • tests and/or benchmarks are included
  • commit message follows commit guidelines
Affected core subsystem(s)

test zlib

Description of change

Add tests for constructor behavior and parameter validation. Remove condition check that cannot be triggered (nothing is greater than Infinity).

Add tests for constructor behavior and parameter validation. Remove
condition check that cannot be triggered (nothing is greater than
`Infinity`).
@Trott Trott added zlib Issues and PRs related to the zlib subsystem. test Issues and PRs related to the tests. labels Oct 30, 2016
@nodejs-github-bot nodejs-github-bot added the zlib Issues and PRs related to the zlib subsystem. label Oct 30, 2016
@Trott
Copy link
Member Author

Trott commented Oct 30, 2016

/^Error: Invalid chunk size: -Infinity$/
);

// Confrim that maximum chunk size cannot be exceeded because it is `Infinity`.
Copy link
Contributor

Choose a reason for hiding this comment

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

typo: Confrim

);

// Confrim that maximum chunk size cannot be exceeded because it is `Infinity`.
assert.deepEqual(zlib.constants.Z_MAX_CHUNK, Infinity);
Copy link
Contributor

Choose a reason for hiding this comment

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

Should this be strictEqual() instead?

@cjihrig
Copy link
Contributor

cjihrig commented Oct 30, 2016

LGTM with a couple nits.

@Trott
Copy link
Member Author

Trott commented Oct 30, 2016

Nits addressed. Thanks.

CI again: https://ci.nodejs.org/job/node-test-pull-request/4742/

@JungMinu
Copy link
Member

JungMinu commented Nov 2, 2016

LGTM

Trott added a commit to Trott/io.js that referenced this pull request Nov 2, 2016
Add tests for constructor behavior and parameter validation. Remove
condition check that cannot be triggered (nothing is greater than
`Infinity`).

PR-URL: nodejs#9366
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
Reviewed-By: Minwoo Jung <jmwsoft@gmail.com>
Reviewed-By: James M Snell <jasnell@gmail.com>
@Trott
Copy link
Member Author

Trott commented Nov 2, 2016

Lnaded in 3eea668

@Trott Trott closed this Nov 2, 2016
evanlucas pushed a commit that referenced this pull request Nov 3, 2016
Add tests for constructor behavior and parameter validation. Remove
condition check that cannot be triggered (nothing is greater than
`Infinity`).

PR-URL: #9366
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
Reviewed-By: Minwoo Jung <jmwsoft@gmail.com>
Reviewed-By: James M Snell <jasnell@gmail.com>
@MylesBorins
Copy link
Contributor

This does not land cleanly in LTS. Added dont-land label. Please feel free to manually backport

@Trott
Copy link
Member Author

Trott commented Jul 18, 2017

Updated label to dont-land-on-v6.x because depends on zlib.constants not in v6.x.

@Trott Trott deleted the zlib-coverage branch January 13, 2022 22:44
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. zlib Issues and PRs related to the zlib subsystem.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

6 participants