You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

51 lines
1.0 KiB

"use strict";
Object.defineProperty(exports, "__esModule", {
value: true
});
exports.configure = configure;
exports.configureInternal = configureInternal;
exports.getConfig = getConfig;
exports.resetToDefaults = resetToDefaults;
/**
* Global configuration options for React Native Testing Library.
*/
const defaultConfig = {
asyncUtilTimeout: 1000,
defaultIncludeHiddenElements: false
};
let config = {
...defaultConfig
};
/**
* Configure global options for React Native Testing Library.
*/
function configure(options) {
const {
defaultHidden,
...restOptions
} = options;
const defaultIncludeHiddenElements = restOptions.defaultIncludeHiddenElements ?? defaultHidden ?? config.defaultIncludeHiddenElements;
config = {
...config,
...restOptions,
defaultIncludeHiddenElements
};
}
function configureInternal(option) {
config = {
...config,
...option
};
}
function resetToDefaults() {
config = {
...defaultConfig
};
}
function getConfig() {
return config;
}
//# sourceMappingURL=config.js.map