8b51f174d8
Co-authored-by: Lee Randy <randy.lee@metronom.com> Co-authored-by: Evan Hahn <69474926+EvanHahn-Signal@users.noreply.github.com> See [#5053][0]. [0]: https://github.com/signalapp/Signal-Desktop/pull/5053
13 lines
439 B
TypeScript
13 lines
439 B
TypeScript
// Copyright 2021 Signal Messenger, LLC
|
|
// SPDX-License-Identifier: AGPL-3.0-only
|
|
|
|
import { assert } from 'chai';
|
|
import { cleanSearchTerm } from '../../util/cleanSearchTerm';
|
|
|
|
describe('cleanSearchTerm', () => {
|
|
it('should remove \\ from a search term', () => {
|
|
const searchTerm = '\\search\\term';
|
|
const sanitizedSearchTerm = cleanSearchTerm(searchTerm);
|
|
assert.strictEqual(sanitizedSearchTerm, 'search* term*');
|
|
});
|
|
});
|