mirror of https://github.com/zulip/zulip.git
node tests: Speed up echo.js by stubbing window.
This commit is contained in:
parent
fa729f11bd
commit
e4e0b6d572
|
@ -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 = {
|
||||
|
|
Loading…
Reference in New Issue