mirror of https://github.com/zulip/zulip.git
node tests: Fully cover compare_by_popularity() in typeahead_helper.js.
This commit is contained in:
parent
649558476e
commit
ee48ac1854
|
@ -53,6 +53,13 @@ stream_data.create_streams([
|
|||
|
||||
// Sort languages by matching first letter, and then by popularity
|
||||
assert.deepEqual(test_langs, ["python", "php", "pascal", "perl", "javascript"]);
|
||||
|
||||
// Test if popularity between two languages are the same
|
||||
global.pygments_data.langs.php = 40;
|
||||
test_langs = ["pascal", "perl", "php", "python", "javascript"];
|
||||
test_langs = th.sort_languages(test_langs, "p");
|
||||
|
||||
assert.deepEqual(test_langs, ["php", "python", "pascal", "perl", "javascript"]);
|
||||
}());
|
||||
|
||||
var matches = [
|
||||
|
|
Loading…
Reference in New Issue