add_dependencies({ Handlebars: 'handlebars', templates: 'js/templates', i18n: 'i18next' }); var i18n = global.i18n; i18n.init({ nsSeparator: false, keySeparator: false, interpolation: { prefix: "__", suffix: "__" }, lng: 'fr', resources: { fr: { translation: { 'Reply': "French", "You'll receive notifications when a message arrives and __page_params.product_name__ isn't in focus or the message is offscreen.": "Some French text with __page_params.product_name__" } } } }); var jsdom = require("jsdom"); var window = jsdom.jsdom().defaultView; global.$ = require('jquery')(window); var _ = global._; // When writing these tests, the following command might be helpful: // ./tools/get-handlebar-vars static/templates/*.handlebars function render(template_name, args) { global.use_template(template_name); return global.templates.render(template_name, args); } (function test_t_tag() { var args = { "message": { is_stream: true, id: "99", stream: "devel", subject: "testing", sender_full_name: "King Lear" }, "can_edit_message": true, "can_mute_topic": true, "narrowed": true }; var html = '