realm_playground: Use Intl.ListFormat rather than .join(",").

Fixes: #26936

Co-authored by: CIC4DA <dhruv.jain9100@gmail.com>
This commit is contained in:
whilstsomebody
2025-01-02 16:06:12 +05:30
committed by Tim Abbott
parent 6c6d5fbb6a
commit b9c037e0ee
2 changed files with 6 additions and 1 deletions

View File

@@ -9,6 +9,7 @@ const {$t} = zrequire("i18n");
const pygments_data = zrequire("pygments_data");
const realm_playground = zrequire("realm_playground");
const typeahead_helper = zrequire("typeahead_helper");
const {initialize_user_settings} = zrequire("user_settings");
run_test("get_pygments_typeahead_list_for_composebox", () => {
// When no Code Playground is configured, the list of candidates should
@@ -45,6 +46,8 @@ run_test("get_pygments_typeahead_list_for_composebox", () => {
});
run_test("get_pygments_typeahead_list_for_settings", () => {
initialize_user_settings({user_settings: {}});
const custom_pygment_language = "custom_lang";
const playground_data = [
{