mirror of
https://github.com/hanzoai/sentinel.git
synced 2026-09-29 22:34:33 +00:00
26 lines
652 B
TypeScript
26 lines
652 B
TypeScript
import merge from 'lodash/merge';
|
|
|
|
import {DEFAULT_QUERY_CLIENT_CONFIG, QueryClient} from 'sentry/utils/queryClient';
|
|
|
|
export const makeTestQueryClient = () =>
|
|
new QueryClient(
|
|
merge({}, DEFAULT_QUERY_CLIENT_CONFIG, {
|
|
defaultOptions: {
|
|
queries: {
|
|
// Disable retries for tests to allow them to fail fast
|
|
retry: false,
|
|
},
|
|
mutations: {
|
|
// Disable retries for tests to allow them to fail fast
|
|
retry: false,
|
|
},
|
|
},
|
|
// Don't want console output in tests
|
|
logger: {
|
|
log: () => {},
|
|
warn: () => {},
|
|
error: () => {},
|
|
},
|
|
})
|
|
);
|