node tests: Use zrequire in narrow_state.js.

This commit is contained in:
Steve Howell 2017-11-08 09:25:20 -08:00 committed by Tim Abbott
parent 2fac1fe6c9
commit 65dc6a0975
1 changed files with 4 additions and 11 deletions

View File

@ -1,18 +1,11 @@
add_dependencies({
people: 'js/people.js',
stream_data: 'js/stream_data.js',
Filter: 'js/filter.js',
});
zrequire('people');
zrequire('Filter', 'js/filter');
zrequire('stream_data');
zrequire('narrow_state');
set_global('page_params', {
});
var narrow_state = require('js/narrow_state.js');
var Filter = global.Filter;
var stream_data = global.stream_data;
var _ = global._;
function set_filter(operators) {
operators = _.map(operators, function (op) {
return {operator: op[0], operand: op[1]};