Skip to content

Add setGlobalTimeoutOverrides - #416

Merged
nev21 merged 1 commit into
mainfrom
nev21/GlobalTimeout
Apr 28, 2025
Merged

nev21 merged 1 commit into
mainfrom
nev21/GlobalTimeout

Conversation

@nev21

@nev21 nev21 commented Apr 28, 2025 •

Copy link
Copy Markdown
Contributor

This PR adds a global timeout override mechanism with the new function setGlobalTimeoutOverrides and extends the tests to ensure its proper behavior while also updating the README link check to include additional functions.

  • Added tests in timeout.test.ts for global timeout override functionality.
  • Updated the exports in index.ts and the implementation in timeout.ts to support the new functionality.
  • Updated readme-links-check.js and bundle-size-check.js as per the new documentation and bundle size limits.

- Also updates readme link check to identify missed functions
@nev21 nev21 added this to the 0.12.3 milestone Apr 28, 2025
Copilot AI review requested due to automatic review settings April 28, 2025 03:38
@nev21
nev21 requested a review from a team as a code owner April 28, 2025 03:38

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 adds a global timeout override mechanism with the new function setGlobalTimeoutOverrides and extends the tests to ensure its proper behavior while also updating the README link check to include additional functions.

  • Added tests in timeout.test.ts for global timeout override functionality.
  • Updated the exports in index.ts and the implementation in timeout.ts to support the new functionality.
  • Updated readme-links-check.js and bundle-size-check.js as per the new documentation and bundle size limits.

Reviewed Changes

Copilot reviewed 6 out of 6 changed files in this pull request and generated no comments.

Show a summary per file
File Description
lib/test/src/common/timer/timeout.test.ts Added test suites to validate global timeout override behavior
lib/test/readme-links-check.js Updated logic to filter and display unlinked documentation files
lib/test/bundle-size-check.js Adjusted bundle size limits as per new thresholds
lib/src/timer/timeout.ts Introduced global override functions and integrated them in timeout APIs
lib/src/index.ts Updated exports to include the new setGlobalTimeoutOverrides function
README.md Updated documentation to reflect the new timeout override functionality
Comments suppressed due to low confidence (1)

lib/test/src/common/timer/timeout.test.ts:886

  • [nitpick] Consider renaming the loop variable 'lp' to a more descriptive identifier (e.g. 'i' or 'tick') to improve code readability.
for (let lp = 0; lp < 99; lp++) {

@codecov

codecov Bot commented Apr 28, 2025 •

Copy link
Copy Markdown

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 98.85%. Comparing base (8c94a17) to head (1576aa6).
Report is 8 commits behind head on main.

Additional details and impacted files
@@            Coverage Diff             @@
##             main     #416      +/-   ##
==========================================
- Coverage   98.92%   98.85%   -0.07%     
==========================================
  Files         108      108              
  Lines        2879     2890      +11     
  Branches      606      591      -15     
==========================================
+ Hits         2848     2857       +9     
- Misses         31       33       +2     
Files with missing lines Coverage Δ
lib/src/timer/timeout.ts 100.00% <100.00%> (ø)

... 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 bbdf890 into main Apr 28, 2025
@nev21
nev21 deleted the nev21/GlobalTimeout branch April 28, 2025 04:07
@nev21 nev21 added the enhancement New feature or request label May 5, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

enhancement New feature or request

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants