node tests: Use zrequire in templates.js.

This commit is contained in:
Steve Howell 2017-11-08 10:24:52 -08:00 committed by Tim Abbott
parent 4ef8df15c9
commit 83c9b1134e
1 changed files with 2 additions and 12 deletions

View File

@ -1,21 +1,11 @@
set_global('page_params', {realm_emoji: {
burrito: {display_url: '/static/generated/emoji/images/emoji/burrito.png',
source_url: '/static/generated/emoji/images/emoji/burrito.png'},
}});
add_dependencies({
Handlebars: 'handlebars',
templates: 'js/templates',
emoji_codes: 'generated/emoji/emoji_codes.js',
emoji: 'js/emoji',
});
zrequire('Handlebars', 'handlebars');
zrequire('templates');
set_global('i18n', global.stub_i18n);
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