mirror of
https://github.com/hanzoai/sentinel.git
synced 2026-09-29 22:34:33 +00:00
16 lines
379 B
TypeScript
16 lines
379 B
TypeScript
import {IS_ACCEPTANCE_TEST} from 'sentry/constants';
|
|
|
|
/**
|
|
* Return a specified "fixed" string when we are in a testing environment
|
|
* (more specifically, when `IS_ACCEPTANCE_TEST` is true)
|
|
*/
|
|
export default function getDynamicText<Value, Fixed = Value>({
|
|
value,
|
|
fixed,
|
|
}: {
|
|
fixed: Fixed;
|
|
value: Value;
|
|
}): Value | Fixed {
|
|
return IS_ACCEPTANCE_TEST ? fixed : value;
|
|
}
|