Reorganize test cases
This commit is contained in:
parent
3a745f2b6e
commit
843f545ceb
271 changed files with 236 additions and 245 deletions
38
ts/test-node/processSyncMessage_test.ts
Normal file
38
ts/test-node/processSyncMessage_test.ts
Normal file
|
@ -0,0 +1,38 @@
|
|||
// Copyright 2021 Signal Messenger, LLC
|
||||
// SPDX-License-Identifier: AGPL-3.0-only
|
||||
|
||||
import { assert } from 'chai';
|
||||
import { generateAci } from '../types/ServiceId';
|
||||
|
||||
import { processSyncMessage } from '../textsecure/processSyncMessage';
|
||||
|
||||
describe('processSyncMessage', () => {
|
||||
const destinationServiceId = generateAci();
|
||||
|
||||
it('should normalize UUIDs in sent', () => {
|
||||
const out = processSyncMessage({
|
||||
sent: {
|
||||
destinationServiceId: destinationServiceId.toUpperCase(),
|
||||
|
||||
unidentifiedStatus: [
|
||||
{
|
||||
destinationServiceId: destinationServiceId.toUpperCase(),
|
||||
},
|
||||
],
|
||||
},
|
||||
});
|
||||
|
||||
assert.deepStrictEqual(out, {
|
||||
sent: {
|
||||
destinationServiceId,
|
||||
|
||||
storyMessageRecipients: undefined,
|
||||
unidentifiedStatus: [
|
||||
{
|
||||
destinationServiceId,
|
||||
},
|
||||
],
|
||||
},
|
||||
});
|
||||
});
|
||||
});
|
Loading…
Add table
Add a link
Reference in a new issue