Changeset 0448e34 in Klonkt for test/messages-conversations.test.js
- Timestamp:
- 08/06/2026 02:04:30 AM (5 weeks ago)
- Branches:
- main
- Children:
- a78a0ef
- Parents:
- 7875a80
- git-author:
- Robin <roboburr@…> (08/06/2026 02:04:29 AM)
- git-committer:
- Claude (agent) <aiclaude@…> (08/06/2026 02:04:30 AM)
- File:
-
- 1 edited
-
test/messages-conversations.test.js (modified) (1 diff)
Legend:
- Unmodified
- Added
- Removed
-
test/messages-conversations.test.js
r7875a80 r0448e34 112 112 assert.equal(out[0].type, 'sent'); 113 113 }); 114 115 test('een direct bericht zonder to_handle valt terug op to_actors', () => { 116 // Precies het geval waarin het het onlogischst is dat er geen draad ontstaat: 117 // een gesprek dat JIJ begon. Zonder deze terugval bleef het een losse regel. 118 const key = threadKey({ 119 type: 'sent', 120 to_actors: JSON.stringify(['https://a.test/users/anna', 'https://b.test/users/bo']), 121 created_at: ts(1), 122 }); 123 assert.equal(key, 'actor:anna@a.test'); 124 // Rommel in de kolom mag niets omgooien. 125 assert.equal(threadKey({ type: 'sent', to_actors: 'geen json' }), null); 126 assert.equal(threadKey({ type: 'sent', to_actors: '[]' }), null); 127 }); 128 129 test('to_handle wint van to_actors, zodat een draad niet splitst', () => { 130 const a = threadKey({ type: 'sent', to_handle: '@anna@a.test' }); 131 const b = threadKey({ type: 'sent', to_handle: '@anna@a.test', to_actors: JSON.stringify(['https://b.test/users/bo']) }); 132 assert.equal(a, b, 'dezelfde tegenpartij hoort dezelfde sleutel te geven'); 133 });
Note:
See TracChangeset
for help on using the changeset viewer.
![(please configure the [header_logo] section in trac.ini)](/chrome/site/your_project_logo.png)