From 4fa6aa22685d02c2103c842ff5616457e2b9ff50 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Yago=20Gonz=C3=A1lez?= Date: Thu, 22 Jun 2017 23:40:43 +0200 Subject: [PATCH] node tests: Re-sort begins_typeahead tests. --- .../node_tests/composebox_typeahead.js | 27 +++++++++---------- 1 file changed, 13 insertions(+), 14 deletions(-) diff --git a/frontend_tests/node_tests/composebox_typeahead.js b/frontend_tests/node_tests/composebox_typeahead.js index ec22863e0b..c00aa571c2 100644 --- a/frontend_tests/node_tests/composebox_typeahead.js +++ b/frontend_tests/node_tests/composebox_typeahead.js @@ -63,15 +63,6 @@ global.people.add(deactivated_user); assert.deepEqual(returned, reference); } - assert_typeahead_equals("test", false); - assert_typeahead_equals("test one two", false); - assert_typeahead_equals("test *", false); - assert_typeahead_equals("test @", false); - assert_typeahead_equals("test no@o", false); - assert_typeahead_equals("test :-P", false); - assert_typeahead_equals("test # a", false); - assert_typeahead_equals("test #", false); - var all_items = [ { special_item_text: 'all (Notify everyone)', @@ -88,29 +79,37 @@ global.people.add(deactivated_user); ]; var people_with_all = global.people.get_realm_persons().concat(all_items); + var lang_list = Object.keys(pygments_data.langs); + assert_typeahead_equals("test", false); + assert_typeahead_equals("test one two", false); + assert_typeahead_equals("test *", false); + + assert_typeahead_equals("test @", false); + assert_typeahead_equals("test no@o", false); + assert_typeahead_equals("@zuli", people_with_all); assert_typeahead_equals("test @o", people_with_all); assert_typeahead_equals("test @z", people_with_all); - assert_typeahead_equals("@zuli", people_with_all); + assert_typeahead_equals("test :-P", false); assert_typeahead_equals("hi emoji :", false); assert_typeahead_equals("hi emoji :ta", emoji_list); assert_typeahead_equals("hi emoji :da", emoji_list); assert_typeahead_equals("test #", false); - assert_typeahead_equals("test #D", stream_list); + assert_typeahead_equals("test # a", false); assert_typeahead_equals("#s", stream_list); + assert_typeahead_equals("test #D", stream_list); - var lang_list = Object.keys(pygments_data.langs); assert_typeahead_equals("``` ", false); assert_typeahead_equals("test ``` py", false); assert_typeahead_equals("test ```a", false); - assert_typeahead_equals("```b", lang_list); assert_typeahead_equals("``c", false); + assert_typeahead_equals("```b", lang_list); assert_typeahead_equals("``` d", lang_list); + assert_typeahead_equals("test ~~~", false); assert_typeahead_equals("~~~e", lang_list); assert_typeahead_equals("~~~ f", lang_list); - assert_typeahead_equals("test ~~~", false); }()); (function test_tokenizing() {