node tests: Use zrequire in alert_words.js.

This commit is contained in:
Steve Howell 2017-11-08 07:48:11 -08:00 committed by Tim Abbott
parent b0665815d2
commit 640b0d5653
1 changed files with 3 additions and 5 deletions

View File

@ -1,7 +1,3 @@
add_dependencies({
people: 'js/people.js',
});
set_global('page_params', {
alert_words: ['alertone', 'alerttwo', 'alertthree', 'al*rt.*s', '.+', 'emoji'],
});
@ -10,6 +6,9 @@ set_global('feature_flags', {
alert_words: true,
});
zrequire('people');
zrequire('alert_words');
global.people.add({
email: 'tester@zulip.com',
full_name: 'Tester von Tester',
@ -18,7 +17,6 @@ global.people.add({
global.people.initialize_current_user(42);
var alert_words = require('js/alert_words.js');
var regular_message = { sender_email: 'another@zulip.com', content: '<p>a message</p>'};
var own_message = { sender_email: 'tester@zulip.com', content: '<p>hey this message alertone</p>',