Update styles for verified icon

This commit is contained in:
Fedor Indutny 2024-09-24 14:16:51 -07:00 committed by GitHub
parent 03ed42188e
commit 6c38823b50
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
7 changed files with 111 additions and 8 deletions

View file

@ -0,0 +1,53 @@
// Copyright 2024 Signal Messenger, LLC
// SPDX-License-Identifier: AGPL-3.0-only
import { assert } from 'chai';
import enMessages from '../../../_locales/en/messages.json';
import { getAboutText } from '../../util/getAboutText';
import { setupI18n } from '../../util/setupI18n';
const i18n = setupI18n('en', enMessages);
describe('getAboutText', () => {
it('returns undefined when there is no text', () => {
assert.isUndefined(getAboutText({}, i18n));
});
it('returns text when there is text, but not emoji', () => {
assert.strictEqual(
getAboutText(
{
about: 'hello',
},
i18n
),
'hello'
);
});
it('returns text and emoji', () => {
assert.strictEqual(
getAboutText(
{
about: 'hello',
aboutEmoji: '😁',
},
i18n
),
'😁 hello'
);
});
it('simplifies text', () => {
assert.strictEqual(
getAboutText(
{
about: '✓✔☑√⛉⛊⛛hello',
},
i18n
),
'hello'
);
});
});