32 lines
533 B
JavaScript
32 lines
533 B
JavaScript
import {
|
|
getConfig as getConfigDTL,
|
|
configure as configureDTL,
|
|
} from '@testing-library/dom'
|
|
|
|
let configForOIL = {
|
|
inulaStrictMode: false,
|
|
}
|
|
|
|
function getConfig() {
|
|
return {
|
|
...getConfigDTL(),
|
|
...configForOIL,
|
|
}
|
|
}
|
|
|
|
function configure(newConfig) {
|
|
if (typeof newConfig === 'function') {
|
|
newConfig = newConfig(getConfig())
|
|
}
|
|
|
|
const {inulaStrictMode, ...configForDTL} = newConfig
|
|
|
|
configureDTL(configForDTL)
|
|
|
|
configForOIL = {
|
|
...configForOIL,
|
|
inulaStrictMode,
|
|
}
|
|
}
|
|
|
|
export {getConfig, configure} |