node tests: Speed up echo.js by stubbing window.

This commit is contained in:
Steve Howell 2017-04-04 06:31:21 -07:00
parent fa729f11bd
commit e4e0b6d572
1 changed files with 6 additions and 5 deletions

View File

@ -1,11 +1,15 @@
/*global Dict */
var path = require('path');
var fs = require('fs');
var jsdom = require("jsdom");
var window = jsdom.jsdom().defaultView;
global.stub_out_jquery();
set_global('window', {
location: {
origin: 'http://zulip.zulipdev.com',
},
});
set_global('page_params', {
people_list: [],
realm_emoji: {
@ -58,9 +62,6 @@ set_global('$', function (obj) {
set_global('feature_flags', {local_echo: true});
jsdom.changeURL(window, 'http://zulip.zulipdev.com');
set_global('window', window);
var people = global.people;
var cordelia = {