mirror of
https://github.com/signalapp/Signal-Desktop.git
synced 2025-12-24 20:26:24 +00:00
Rename files
This commit is contained in:
32
ts/test-node/util/isConversationSMSOnly_test.std.ts
Normal file
32
ts/test-node/util/isConversationSMSOnly_test.std.ts
Normal file
@@ -0,0 +1,32 @@
|
||||
// Copyright 2021 Signal Messenger, LLC
|
||||
// SPDX-License-Identifier: AGPL-3.0-only
|
||||
|
||||
import { assert } from 'chai';
|
||||
import { generateAci } from '../../types/ServiceId.std.js';
|
||||
|
||||
import { isConversationSMSOnly } from '../../util/isConversationSMSOnly.std.js';
|
||||
|
||||
const serviceId = generateAci();
|
||||
|
||||
describe('isConversationSMSOnly', () => {
|
||||
it('returns false if passed an undefined type', () => {
|
||||
assert.isFalse(
|
||||
isConversationSMSOnly({
|
||||
type: undefined,
|
||||
})
|
||||
);
|
||||
});
|
||||
|
||||
['direct', 'private'].forEach(type => {
|
||||
it(`requires an e164 but no serviceId, type ${type}`, () => {
|
||||
assert.isFalse(isConversationSMSOnly({ type }));
|
||||
assert.isFalse(isConversationSMSOnly({ type, serviceId }));
|
||||
assert.isFalse(isConversationSMSOnly({ type, e164: 'e164', serviceId }));
|
||||
assert.isTrue(isConversationSMSOnly({ type, e164: 'e164' }));
|
||||
});
|
||||
});
|
||||
|
||||
it('returns false for groups', () => {
|
||||
assert.isFalse(isConversationSMSOnly({ type: 'group' }));
|
||||
});
|
||||
});
|
||||
Reference in New Issue
Block a user