Redesign device link screens
This commit is contained in:
parent
a023fc1bb0
commit
364f00f37a
36 changed files with 1358 additions and 803 deletions
22
ts/test-both/util/normalizeDeviceName_test.ts
Normal file
22
ts/test-both/util/normalizeDeviceName_test.ts
Normal file
|
@ -0,0 +1,22 @@
|
|||
// Copyright 2021 Signal Messenger, LLC
|
||||
// SPDX-License-Identifier: AGPL-3.0-only
|
||||
|
||||
import { assert } from 'chai';
|
||||
|
||||
import { normalizeDeviceName } from '../../util/normalizeDeviceName';
|
||||
|
||||
describe('normalizeDeviceName', () => {
|
||||
it('leaves normal device names untouched', () => {
|
||||
for (const name of ['foo', 'bar Baz', '💅💅💅']) {
|
||||
assert.strictEqual(normalizeDeviceName(name), name);
|
||||
}
|
||||
});
|
||||
|
||||
it('trims device names', () => {
|
||||
assert.strictEqual(normalizeDeviceName(' foo\t'), 'foo');
|
||||
});
|
||||
|
||||
it('removes null characters', () => {
|
||||
assert.strictEqual(normalizeDeviceName('\0foo\0bar'), 'foobar');
|
||||
});
|
||||
});
|
Loading…
Add table
Add a link
Reference in a new issue