(options: Partial<Config & ConfigAliasOptions>)
| 32 | * Configure global options for React Native Testing Library. |
| 33 | */ |
| 34 | export 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 | |
| 56 | export function resetToDefaults() { |
| 57 | config = { ...defaultConfig }; |
no test coverage detected
searching dependent graphs…