Ghost/test/unit/services/themes
Fabien 'egg' O'Carroll fac62cd698
Fixed circular dependency warning for the proxy service (#12746)
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.
2021-03-11 16:30:49 +00:00
..
engines Hardened frontend tests checking API engine 2021-02-24 18:55:12 +13:00
handlebars Fixed circular dependency warning for the proxy service (#12746) 2021-03-11 16:30:49 +00:00
active_spec.js Moved config from server to shared (#11850) 2020-05-27 18:47:53 +01:00
config_spec.js Updated var declarations to const/let and no lists 2020-04-29 16:51:13 +01:00
list_spec.js Updated var declarations to const/let and no lists 2020-04-29 16:51:13 +01:00
loader_spec.js 🔥 Added support for Node 14 2020-10-23 12:57:02 +01:00
middleware_spec.js Added theme preview mode 2021-02-17 13:49:41 +00:00
preview_spec.js 🐛 Fixed theme preview not decoding values properly 2021-03-01 11:54:50 +00:00
validate_spec.js Updated links to ghost.org sites 2021-01-20 09:59:45 +13:00