Skip to content

test(@formatjs/intl-displaynames): add more tests for #3387#5777

Closed
longlho wants to merge 1 commit intomainfrom
01-01-test_formatjs_intl-displaynames_add_more_tests_for_3387
Closed

test(@formatjs/intl-displaynames): add more tests for #3387#5777
longlho wants to merge 1 commit intomainfrom
01-01-test_formatjs_intl-displaynames_add_more_tests_for_3387

Conversation

@longlho
Copy link
Member

@longlho longlho commented Jan 2, 2026

TL;DR

Enhanced test coverage for calendar and dateTimeField types in DisplayNames API.

What changed?

Expanded test coverage for the DisplayNames API, specifically for:

  1. Calendar type support:

    • Added tests for different styles (long, short, narrow)
    • Added tests for multiple calendar types with actual values
    • Added tests for calendar codes with hyphens
    • Added tests for case-insensitive handling
    • Added tests for invalid calendar code patterns
    • Added tests for fallback behavior
  2. DateTimeField type support:

    • Added comprehensive tests for all valid dateTimeField codes
    • Added tests for different styles (long, short, narrow)
    • Added tests for invalid dateTimeField codes
    • Added validation tests for all dateTimeField codes from the spec

How to test?

Run the test suite for the intl-displaynames package:

cd packages/intl-displaynames
npm test

Why make this change?

This change addresses issue #3387 by providing more thorough test coverage for calendar and dateTimeField types in the DisplayNames API. The expanded tests ensure proper handling of different styles, code patterns, case sensitivity, and fallback behaviors, which helps validate the implementation against the ECMA-402 specification.

@longlho longlho marked this pull request as ready for review January 2, 2026 03:15
Copy link
Member Author

longlho commented Jan 2, 2026


How to use the Graphite Merge Queue

Add either label to this PR to merge it via the merge queue:

  • main - adds this PR to the back of the merge queue
  • hotfix - for urgent hot fixes, skip the queue and merge this PR next

You must have a Graphite account in order to use the merge queue. Sign up using this link.

An organization admin has required the Graphite Merge Queue in this repository.

Please do not merge from GitHub as this will restart CI on PRs being processed by the merge queue.

This stack of pull requests is managed by Graphite. Learn more about stacking.

@graphite-app
Copy link

graphite-app bot commented Jan 2, 2026

Merge activity

  • Jan 2, 3:17 AM UTC: longlho added this pull request to the Graphite merge queue.
  • Jan 2, 3:17 AM UTC: CI is running for this pull request on a draft pull request (#5779) due to your merge queue CI optimization settings.
  • Jan 2, 3:20 AM UTC: Merged by the Graphite merge queue via draft PR: #5779.

graphite-app bot pushed a commit that referenced this pull request Jan 2, 2026
### TL;DR

Enhanced test coverage for calendar and dateTimeField types in DisplayNames API.

### What changed?

Expanded test coverage for the DisplayNames API, specifically for:

1. Calendar type support:
   - Added tests for different styles (long, short, narrow)
   - Added tests for multiple calendar types with actual values
   - Added tests for calendar codes with hyphens
   - Added tests for case-insensitive handling
   - Added tests for invalid calendar code patterns
   - Added tests for fallback behavior

2. DateTimeField type support:
   - Added comprehensive tests for all valid dateTimeField codes
   - Added tests for different styles (long, short, narrow)
   - Added tests for invalid dateTimeField codes
   - Added validation tests for all dateTimeField codes from the spec

### How to test?

Run the test suite for the intl-displaynames package:

```
cd packages/intl-displaynames
npm test
```

### Why make this change?

This change addresses issue #3387 by providing more thorough test coverage for calendar and dateTimeField types in the DisplayNames API. The expanded tests ensure proper handling of different styles, code patterns, case sensitivity, and fallback behaviors, which helps validate the implementation against the ECMA-402 specification.
@graphite-app graphite-app bot closed this Jan 2, 2026
@graphite-app graphite-app bot deleted the 01-01-test_formatjs_intl-displaynames_add_more_tests_for_3387 branch January 2, 2026 03:20
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.

1 participant