node tests: Extract set_up in settings_bots.js.

This commit is contained in:
Steve Howell 2018-06-12 18:58:57 +00:00 committed by showell
parent 754a05a69e
commit 90ecea5177
1 changed files with 7 additions and 2 deletions

View File

@ -98,7 +98,9 @@ function test_create_bot_type_input_box_toggle(f) {
assert(!config_inputbox.visible());
}
run_test('set_up', () => {
function set_up() {
set_global('$', global.make_zjquery());
// bunch of stubs
$.validator = { addMethod: () => {} };
@ -124,5 +126,8 @@ run_test('set_up', () => {
avatar.build_bot_edit_widget = () => {};
settings_bots.set_up();
});
}
run_test('set_up', () => {
set_up();
});