Skip to content

Commit

Permalink
Drop test-specific debounce time
Browse files Browse the repository at this point in the history
  • Loading branch information
narsaynorath committed Dec 10, 2024
1 parent 963ff33 commit 8c0d602
Showing 1 changed file with 3 additions and 9 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -12,9 +12,6 @@ import {DEFAULT_DEBOUNCE_DURATION} from 'sentry/constants';
import {useLocation} from 'sentry/utils/useLocation';
import {useNavigate} from 'sentry/utils/useNavigate';

const {NODE_ENV, TEST_SUITE} = process.env;
const IS_TEST = NODE_ENV === 'test' || !!TEST_SUITE;

type BatchContextType = {
batchUrlParamUpdates: (updates: Record<string, string | string[] | undefined>) => void;
flushUpdates: () => void;
Expand Down Expand Up @@ -53,12 +50,9 @@ export function UrlParamBatchProvider({children}: {children: React.ReactNode}) {
// Debounce URL updates
const updateURL = useMemo(
() =>
debounce(
() => {
flushUpdates();
},
IS_TEST ? 0 : DEFAULT_DEBOUNCE_DURATION
),
debounce(() => {
flushUpdates();
}, DEFAULT_DEBOUNCE_DURATION),
[flushUpdates]
);

Expand Down

0 comments on commit 8c0d602

Please sign in to comment.