Improve performance of mock tests

This commit is contained in:
Jamie Kyle 2024-02-29 14:01:12 -08:00 committed by GitHub
parent ea9a7385d6
commit 9c072c5bc1
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
9 changed files with 18 additions and 64 deletions

View file

@ -1,8 +1,6 @@
// Copyright 2024 Signal Messenger, LLC
// SPDX-License-Identifier: AGPL-3.0-only
import { Environment, getEnvironment } from '../environment';
/**
* Left-to-Right Isolate
* Sets direction to LTR and isolates the embedded content from the surrounding text
@ -210,7 +208,7 @@ export function _bidiIsolate(text: string): string {
* ```
*/
export function bidiIsolate(text: string): string {
if (getEnvironment() === Environment.Test) {
if (process.env.IS_TESTS != null) {
// Turn this off in tests to make it easier to compare strings
return text;
}