@linktr.ee/messaging-react 3.30.0-rc-1785813372 → 3.30.0-rc-1785813459

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@linktr.ee/messaging-react",
3
- "version": "3.30.0-rc-1785813372",
3
+ "version": "3.30.0-rc-1785813459",
4
4
  "description": "React messaging components built on messaging-core for web applications",
5
5
  "type": "module",
6
6
  "main": "dist/index.cjs",
@@ -50,7 +50,7 @@
50
50
  },
51
51
  "dependencies": {
52
52
  "@linktr.ee/component-library": "11.8.6",
53
- "@linktr.ee/messaging-core": "2.3.0-rc-1785813372",
53
+ "@linktr.ee/messaging-core": "2.3.0-rc-1785813459",
54
54
  "@linktr.ee/messaging-taxonomy": "^0.5.0",
55
55
  "@phosphor-icons/react": "^2.1.10",
56
56
  "culori": "^4.0.2"
@@ -76,25 +76,22 @@ describe('formatRelativeTime', () => {
76
76
 
77
77
  describe('2-6 days ago (short weekday)', () => {
78
78
  // The weekday branch uses the runtime locale
79
- // (toLocaleDateString(undefined, …)), so assertions avoid fixed
80
- // strings that would depend on the test runner's ambient ICU locale.
81
- // A short weekday name is purely alphabetic with no digits.
82
- const weekdayPattern = /^\p{L}+$/u
83
-
79
+ // (toLocaleDateString(undefined, …)), so assertions compare against
80
+ // the same locale-aware formatter rather than fixed English strings.
84
81
  it('should return a short weekday name for messages 2 days ago', () => {
85
82
  mockDate('2024-01-15T12:00:00')
86
83
  const date = new Date('2024-01-13T12:00:00') // Saturday
87
- const result = formatRelativeTime(date)
88
- expect(result).toMatch(weekdayPattern)
89
- expect(result).toBe(date.toLocaleDateString(undefined, { weekday: 'short' }))
84
+ expect(formatRelativeTime(date)).toBe(
85
+ date.toLocaleDateString(undefined, { weekday: 'short' })
86
+ )
90
87
  })
91
88
 
92
89
  it('should return a short weekday name for messages 6 days ago (boundary before dates)', () => {
93
90
  mockDate('2024-01-15T12:00:00')
94
91
  const date = new Date('2024-01-09T12:00:00') // Tuesday
95
- const result = formatRelativeTime(date)
96
- expect(result).toMatch(weekdayPattern)
97
- expect(result).toBe(date.toLocaleDateString(undefined, { weekday: 'short' }))
92
+ expect(formatRelativeTime(date)).toBe(
93
+ date.toLocaleDateString(undefined, { weekday: 'short' })
94
+ )
98
95
  })
99
96
  })
100
97