Fix narrow format test expectations for Playwright 1.58.2 / newer Chromium ICU#346
Merged
liuliu-dev merged 2 commits intodependabot/npm_and_yarn/npm_and_yarn-8ff8a2d82bfrom Mar 9, 2026
Conversation
…um/ICU Co-authored-by: francinelucca <40550942+francinelucca@users.noreply.github.com>
Copilot
AI
changed the title
[WIP] Bump npm_and_yarn group across 1 directory with updates
Fix narrow format test expectations for Playwright 1.58.2 / newer Chromium ICU
Mar 4, 2026
liuliu-dev
approved these changes
Mar 9, 2026
d813545
into
dependabot/npm_and_yarn/npm_and_yarn-8ff8a2d82b
3 checks passed
Contributor
There was a problem hiding this comment.
Pull request overview
Updates narrow-style relative time test expectations to align with the newer ICU data shipped in Playwright 1.58.2’s Chromium, and adjusts a DurationFormat ponyfill option object for stricter TypeScript Intl.NumberFormat typing.
Changes:
- Update
Intl.RelativeTimeFormatnarrowoutput expectations (e.g.,in 1 hr.→in 1h) in the relative-time test suite. - Add
as constto the'unit'style literal induration-format-ponyfill.tsto satisfy updated TS overload resolution forIntl.NumberFormat.
Reviewed changes
Copilot reviewed 2 out of 2 changed files in this pull request and generated no comments.
| File | Description |
|---|---|
| test/relative-time.js | Updates narrow-style expected strings to match newer Chromium ICU output. |
| src/duration-format-ponyfill.ts | Narrows the 'unit' option literal type to fix TypeScript overload inference for Intl.NumberFormat. |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Playwright 1.58.2 ships a newer Chromium with updated ICU data that produces shorter
narrowstyle strings fromIntl.RelativeTimeFormat— dropping abbreviation periods and spaces (e.g.in 1 hr.→in 1h,in 1 min.→in 1m,3 wk. ago→3w ago).Changes
test/relative-time.js— Update 15narrowformatStyle expectations to match the new ICU output:in 50 sec.in 50sin 1 min./1 min. agoin 1m/1m agoin 1 hr./1 hr. agoin 1h/1h agoin 3 wk./3 wk. agoin 3w/3w agoin 2 yr.in 2ysrc/duration-format-ponyfill.ts— Addas constto the'unit'string literal to satisfy the stricterIntl.NumberFormatoverload resolution introduced by the updated TypeScript version:🔒 GitHub Advanced Security automatically protects Copilot coding agent pull requests. You can protect all pull requests by enabling Advanced Security for your repositories. Learn more about Advanced Security.