Skip to content

Add more unit-tests for the src/core/primitives.js file - #21820

Merged
timvandermeij merged 1 commit into
mozilla:masterfrom
Snuffleupagus:primitives-more-unit-tests
Aug 25, 2026
Merged

Add more unit-tests for the src/core/primitives.js file#21820
timvandermeij merged 1 commit into
mozilla:masterfrom
Snuffleupagus:primitives-more-unit-tests

Conversation

@Snuffleupagus

Copy link
Copy Markdown
Collaborator

Add unit-tests for various "error branches" in the code, which brings code coverage of this file to almost 100 percent.
Also, add a couple of unit-tests for the Ref.fromString functionality since it was only indirectly tested.

@codecov-commenter

codecov-commenter commented Aug 25, 2026

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 90.20%. Comparing base (a570239) to head (8dd03be).

Additional details and impacted files
@@           Coverage Diff           @@
##           master   #21820   +/-   ##
=======================================
  Coverage   90.20%   90.20%           
=======================================
  Files         264      264           
  Lines       67322    67321    -1     
=======================================
  Hits        60729    60729           
+ Misses       6593     6592    -1     
Flag Coverage Δ
browsertest 66.31% <100.00%> (-0.01%) ⬇️
fonttest 8.91% <100.00%> (+<0.01%) ⬆️
integrationtest 69.40% <100.00%> (-0.01%) ⬇️
unittest 58.39% <100.00%> (+0.01%) ⬆️
unittestcli 56.94% <100.00%> (+0.01%) ⬆️

Flags with carried forward coverage won't be shown. Click here to find out more.

☔ View full report in Codecov by Harness.
📢 Have feedback on the report? Share it here.

🚀 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.

Add unit-tests for various "error branches" in the code, which brings code coverage of this file to *almost* 100 percent.
Also, add a couple of unit-tests for the `Ref.fromString` functionality since it was only indirectly tested.
@Snuffleupagus
Snuffleupagus force-pushed the primitives-more-unit-tests branch from 1bef6a4 to 8dd03be Compare August 25, 2026 10:38
@Snuffleupagus

Copy link
Copy Markdown
Collaborator Author

/botio browsertest

@moz-tools-bot

Copy link
Copy Markdown
Collaborator

From: Bot.io (Windows)


Received

Command cmd_browsertest from @Snuffleupagus received. Current queue size: 0

Live output at: http://54.193.163.58:8877/c03ae22db781d28/output.txt

@moz-tools-bot

Copy link
Copy Markdown
Collaborator

From: Bot.io (Linux m4)


Received

Command cmd_browsertest from @Snuffleupagus received. Current queue size: 0

Live output at: http://54.241.84.105:8877/a17a901e99d7b86/output.txt

@moz-tools-bot

Copy link
Copy Markdown
Collaborator

From: Bot.io (Linux m4)


Success

Full output at http://54.241.84.105:8877/a17a901e99d7b86/output.txt

Total script time: 18.11 mins

  • Regression tests: Passed

@moz-tools-bot

Copy link
Copy Markdown
Collaborator

From: Bot.io (Windows)


Success

Full output at http://54.193.163.58:8877/c03ae22db781d28/output.txt

Total script time: 23.50 mins

  • Regression tests: Passed

@calixteman calixteman 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.

LGTM. Thank you.

@timvandermeij timvandermeij left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

More tests can never hurt; thank you!

@timvandermeij
timvandermeij merged commit 2cfbdb5 into mozilla:master Aug 25, 2026
21 checks passed
@Snuffleupagus
Snuffleupagus deleted the primitives-more-unit-tests branch August 25, 2026 18:12
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

5 participants