mirror of
https://github.com/TryGhost/Ghost.git
synced 2024-12-21 01:41:46 +03:00
fac62cd698
no-issue The handlebars template module is required by the proxy service, as part of the definition of the proxy service's module.exports. By destructuring the i18n property from the proxy service at the time the template module is loaded, the i18n property was always undefined, as the module.exports of the proxy service had not been set. Bypassing the proxy, and requiring the i18n module directly eliminates the circular dependency. * Refactored handlebars template tests to use proxy Since this module is intended to be used via the proxy, we should test it in the same way. We have uncovered a circular dependency issue, which would not be possible to catch in tests unless the tests were to go via the proxy. * Added breaking test for handlebars template function This test highlights the issue caused by a circular dependency, we are unable to throw an IncorrectUsageError because i18n is undefined. |
||
---|---|---|
.. | ||
apps | ||
helpers | ||
meta | ||
services | ||
views |