Rename files

This commit is contained in:
Fedor Indutny
2025-10-16 17:33:01 -07:00
parent 3387cf6a77
commit 44076ece79
2411 changed files with 0 additions and 0 deletions

View File

@@ -0,0 +1,40 @@
// Copyright 2025 Signal Messenger, LLC
// SPDX-License-Identifier: AGPL-3.0-only
import { assert } from 'chai';
import { makeKeysLowercase } from '../../textsecure/WebAPI.preload.js';
describe('WebAPI', () => {
describe('makeKeysLowercase', () => {
it('handles empty object', () => {
const expected = Object.create(null);
const actual = makeKeysLowercase({});
assert.deepEqual(expected, actual);
});
it('handles one key', () => {
const expected = Object.create(null);
expected.low = 4;
const actual = makeKeysLowercase({
LOW: 4,
});
assert.deepEqual(expected, actual);
});
it('handles lots of keys', () => {
const expected = Object.create(null);
expected.one = 'one more';
expected.two = 'two more';
expected.three = 'three';
const actual = makeKeysLowercase({
One: 'one more',
TWO: 'two more',
ThreE: 'three',
});
assert.deepEqual(expected, actual);
});
});
});