test(HH-592): cover realtime timestamp boundaries (#153)

Co-authored-by: Rogee <rogee@ipao.vip>
This commit is contained in:
Rogee
2026-08-24 11:13:53 +08:00
committed by GitHub
co-authored by rogee
parent 2c6bee2b37
commit 92ace6b041
3 changed files with 27 additions and 10 deletions
@@ -113,7 +113,7 @@ describe('Widget ActionCableConnector', () => {
expect(IFrameHelper.sendMessage).not.toHaveBeenCalled();
});
it('rejects an older numeric-string timestamp against an ISO timestamp', async () => {
it('treats an exact 1e10 numeric string as milliseconds', async () => {
const currentMessage = {
id: 42,
conversation_id: 7,
@@ -126,7 +126,7 @@ describe('Widget ActionCableConnector', () => {
await actionCable.onMessageUpdated({
...currentMessage,
content: 'older',
updated_at: '1787533200',
updated_at: '10000000000',
previous_changes: {
content_attributes: [{}, { submitted_values: ['yes'] }],
},