Skip to content

Increase code coverage - #412

Merged
nev21 merged 1 commit into
mainfrom
nev21/Coverage
Apr 26, 2025
Merged

nev21 merged 1 commit into
mainfrom
nev21/Coverage

Conversation

@nev21

@nev21 nev21 commented Apr 26, 2025

Copy link
Copy Markdown
Contributor

No description provided.

Copilot AI review requested due to automatic review settings April 26, 2025 18:44
@nev21
nev21 requested a review from a team as a code owner April 26, 2025 18:44

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Pull Request Overview

This PR aims to increase code coverage by adding tests for the number helper functions while also refactoring several polyfill modules to use a consolidated internal implementation. Key changes include:

  • Adding comprehensive tests for the getIntValue function.
  • Updating import paths in polyfill modules (objIsSealed, objIsFrozen, etc.) to use the new consolidated get_own_property APIs.
  • Removing deprecated polyfill files and re-exporting consolidated implementations in the lib/src/index.ts file.

Reviewed Changes

Copilot reviewed 28 out of 28 changed files in this pull request and generated 1 comment.

Show a summary per file
File Description
lib/test/src/common/helpers/number.test.ts Added tests to increase coverage for getIntValue and related helpers.
lib/src/helpers/number.ts Updated getIntValue to use asString conversion and a try/catch block.
lib/src/polyfills/object/objIsSealed.ts & objIsFrozen.ts Updated import paths to reference the new get_own_property module.
lib/src/object/has_own.ts & lib/src/object/define.ts Refactored internal helper usages to align with the new unified API.
lib/src/internal/* and other get_own_property* files Removed deprecated files and consolidated various object helper APIs.
Comments suppressed due to low confidence (1)

lib/src/object/define.ts:270

  • [nitpick] The use of the internal helper _objGetOwnPropertySymbols is a change from the previous naming. Please ensure that this naming convention is applied consistently across similar helper functions.
arrForEach(_objGetOwnPropertySymbols(propDescMap), (sym) => {

Comment thread lib/src/helpers/number.ts Resolved
@codecov

codecov Bot commented Apr 26, 2025 •

Copy link
Copy Markdown

Codecov Report

Attention: Patch coverage is 97.24138% with 4 lines in your changes missing coverage. Please review.

Project coverage is 98.92%. Comparing base (75903ff) to head (58c5a4d).
Report is 1 commits behind head on main.

Files with missing lines Patch % Lines
lib/src/polyfills/object/objGetOwnProperty.ts 95.29% 4 Missing ⚠️
Additional details and impacted files
@@            Coverage Diff             @@
##             main     #412      +/-   ##
==========================================
+ Coverage   97.50%   98.92%   +1.42%     
==========================================
  Files         114      110       -4     
  Lines        2887     2893       +6     
  Branches      586      608      +22     
==========================================
+ Hits         2815     2862      +47     
+ Misses         72       31      -41     
Files with missing lines Coverage Δ
lib/src/helpers/number.ts 96.42% <100.00%> (+24.01%) ⬆️
lib/src/internal/constants.ts 100.00% <100.00%> (ø)
lib/src/internal/stubs.ts 100.00% <100.00%> (ø)
lib/src/object/define.ts 100.00% <100.00%> (ø)
lib/src/object/get_own_property.ts 100.00% <100.00%> (ø)
lib/src/object/has_own.ts 100.00% <100.00%> (ø)
lib/src/object/object_state.ts 100.00% <100.00%> (+22.22%) ⬆️
lib/src/polyfills/object/objIsFrozen.ts 94.73% <100.00%> (ø)
lib/src/polyfills/object/objIsSealed.ts 94.73% <100.00%> (ø)
lib/src/polyfills/object/objGetOwnProperty.ts 95.29% <95.29%> (ø)

... and 1 file with indirect coverage changes

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.
  • 📦 JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

@nev21
nev21 merged commit e772338 into main Apr 26, 2025
@nev21
nev21 deleted the nev21/Coverage branch April 26, 2025 19:37
@nev21 nev21 added this to the 0.12.3 milestone Apr 28, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants