Skip to content

Add mocha tests for web/common-function.js unpacker_filter and helpers - #2509

Merged
bitwiseman merged 1 commit into
beautifier:mainfrom
OluchiEzeifedikwa:test/web-common-function-1547
Jul 11, 2026
Merged

Add mocha tests for web/common-function.js unpacker_filter and helpers#2509
bitwiseman merged 1 commit into
beautifier:mainfrom
OluchiEzeifedikwa:test/web-common-function-1547

Conversation

@OluchiEzeifedikwa

Copy link
Copy Markdown
Contributor

Covers any(), mergeObjects(), and unpacker_filter() with a regression case for #1546 (multiple leading comments losing formatting).

Description

Adds mocha tests for web/common-function.js, covering any(), mergeObjects(), and unpacker_filter(). Includes a regression test for the multiple-leading-comments bug fixed in #1546, so this class of bug can't silently reappear.

Fixes Issue: #1547

Test plan

  • ./node_modules/.bin/mocha js/test/web/test_common-function.js passes (10/10)
  • Full existing mocha suite still passes
  • jshint clean on the new file

Before Merge Checklist

  • Source branch in your fork has meaningful name (not main)
  • JavaScript implementation
  • Python implementation (NA)
  • Added Tests to data file(s) (NA — new mocha spec file, not a data-driven test fixture)
  • Added command-line option(s) (NA)
  • README.md documents new feature/option(s) (NA — no user-facing feature added)

Covers any(), mergeObjects(), and unpacker_filter() with a regression
case for beautifier#1546 (multiple leading comments losing formatting).
@bitwiseman
bitwiseman merged commit c839778 into beautifier:main Jul 11, 2026
12 checks passed
@OluchiEzeifedikwa

OluchiEzeifedikwa commented Jul 12, 2026 via email

Copy link
Copy Markdown
Contributor Author

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