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({ zrequire('people');
people: 'js/people.js', zrequire('Filter', 'js/filter');
stream_data: 'js/stream_data.js', zrequire('stream_data');
Filter: 'js/filter.js', zrequire('narrow_state');
});
set_global('page_params', { 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) { function set_filter(operators) {
operators = _.map(operators, function (op) { operators = _.map(operators, function (op) {
return {operator: op[0], operand: op[1]}; return {operator: op[0], operand: op[1]};