Skip to content

test: add missing coverage for formatLocation and formatSize#20534

Merged
alexander-akait merged 1 commit intowebpack:mainfrom
shayannab:test/add-missing-unit-coverage
Feb 25, 2026
Merged

test: add missing coverage for formatLocation and formatSize#20534
alexander-akait merged 1 commit intowebpack:mainfrom
shayannab:test/add-missing-unit-coverage

Conversation

@shayannab
Copy link
Contributor

Adds tests for two previously uncovered code branches:

  • formatLocation: name+index branch (returns "foo[3]") and name-only branch (returns "bar")
  • formatSize: negative size input (returns "0 bytes", same as zero — because size <= 0)

No production code was changed.

@changeset-bot
Copy link

changeset-bot bot commented Feb 25, 2026

⚠️ No Changeset found

Latest commit: 6dd3c0e

Merging this PR will not cause a version bump for any packages. If these changes should not result in a new version, you're good to go. If these changes should result in a version bump, you need to add a changeset.

This PR includes no changesets

When changesets are added to this PR, you'll see the packages that this PR includes changesets for and the associated semver types

Click here to learn what changesets are, and how to add one.

Click here if you're a maintainer who wants to add a changeset to this PR

@linux-foundation-easycla
Copy link

linux-foundation-easycla bot commented Feb 25, 2026

CLA Signed
The committers listed above are authorized under a signed CLA.

  • ✅ login: shayannab / name: shayanna (6dd3c0e)

@codspeed-hq
Copy link

codspeed-hq bot commented Feb 25, 2026

Merging this PR will improve performance by 37.92%

⚡ 2 improved benchmarks
✅ 142 untouched benchmarks

Performance Changes

Mode Benchmark BASE HEAD Efficiency
Memory benchmark "many-modules-esm", scenario '{"name":"mode-production","mode":"production"}' 11.1 MB 8 MB +37.92%
Memory benchmark "react", scenario '{"name":"mode-development-rebuild","mode":"development","watch":true}' 865.2 KB 647.4 KB +33.65%

Comparing shayannab:test/add-missing-unit-coverage (6dd3c0e) with main (87987ca)

Open in CodSpeed

@alexander-akait alexander-akait merged commit 4c79ac2 into webpack:main Feb 25, 2026
53 of 55 checks passed
@github-actions
Copy link
Contributor

This PR is packaged and the instant preview is available (4c79ac2).

Install it locally:

  • npm
npm i -D webpack@https://pkg.pr.new/webpack@4c79ac2
  • yarn
yarn add -D webpack@https://pkg.pr.new/webpack@4c79ac2
  • pnpm
pnpm add -D webpack@https://pkg.pr.new/webpack@4c79ac2

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