0
Fork 0
mirror of https://github.com/TryGhost/Ghost.git synced 2025-02-10 23:36:14 -05:00

Fixed config utils to return a usable instance of config

no issue

- It's sometimes needed to use the config uitl intance directly in the test. For example, like it's used in the update check tests
This commit is contained in:
Naz 2021-05-31 20:58:54 +04:00
parent 3173603d96
commit 64e8d0287d

View file

@ -36,6 +36,8 @@ const stubUrlUtils = (options, sandbox) => {
});
}
});
return stubInstance;
};
// Method for regressions tests must be used with restore method
@ -49,7 +51,8 @@ const stubUrlUtilsFromConfig = () => {
redirectCacheMaxAge: config.get('caching:301:maxAge'),
baseApiPath: '/ghost/api'
};
stubUrlUtils(options, defaultSandbox);
return stubUrlUtils(options, defaultSandbox);
};
const restore = () => {