MCPcopy Index your code
hub / github.com/callstack/react-native-testing-library / configure

Function configure

src/config.ts:34–54  ·  view source on GitHub ↗
(options: Partial<Config & ConfigAliasOptions>)

Source from the content-addressed store, hash-verified

32 * Configure global options for React Native Testing Library.
33 */
34export function configure(options: Partial<Config & ConfigAliasOptions>) {
35 const {
36 asyncUtilTimeout,
37 defaultDebugOptions,
38 defaultHidden,
39 defaultIncludeHiddenElements,
40 ...rest
41 } = options;
42
43 validateOptions('configure', rest, configure);
44
45 const resolvedDefaultIncludeHiddenElements =
46 defaultIncludeHiddenElements ?? defaultHidden ?? config.defaultIncludeHiddenElements;
47
48 config = {
49 ...config,
50 asyncUtilTimeout: asyncUtilTimeout ?? config.asyncUtilTimeout,
51 defaultDebugOptions,
52 defaultIncludeHiddenElements: resolvedDefaultIncludeHiddenElements,
53 };
54}
55
56export function resetToDefaults() {
57 config = { ...defaultConfig };

Callers 4

config.test.tsFile · 0.90
wait-for.test.tsxFile · 0.85

Calls 1

validateOptionsFunction · 0.90

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…