import * as baseConfig from '../base-config' ; const currentConfig = jest . fn ( ) . mockReturnValue ( JSON . parse ( JSON . stringify ( baseConfig ) ) ) ; param testConfig export function __updateConfig ( testConfig = { } ) { currentConfig . mockReturnValue ( Object . assign ( { } , baseConfig , testConfig ) ) ; } export function __resetConfig ( ) { currentConfig . mockReturnValue ( baseConfig ) ; } export function loadConfig ( configModule ) { const customConfig = require ( configModule ) ; __updateConfig ( customConfig ) ; const newConfig = JSON . parse ( JSON . stringify ( getConfig ( ) ) ) ; __resetConfig ( ) ; return newConfig ; } export function getConfig ( ) { return currentConfig ( ) ; } export function init ( ) { }