reblend-testing-library
Version:
Simple and complete Reblendjs testing utilities that encourage good testing practices.
31 lines (30 loc) • 679 B
JavaScript
;
exports.__esModule = true;
exports.configure = configure;
exports.getConfig = getConfig;
var _dom = require("@testing-library/dom");
let configForRTL = {
reblendStrictMode: false
};
function getConfig() {
return {
...(0, _dom.getConfig)(),
...configForRTL
};
}
function configure(newConfig) {
if (typeof newConfig === 'function') {
// Pass the existing config out to the provided function
// and accept a delta in return
newConfig = newConfig(getConfig());
}
const {
reblendStrictMode,
...configForDTL
} = newConfig;
(0, _dom.configure)(configForDTL);
configForRTL = {
...configForRTL,
reblendStrictMode
};
}