You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
ordinals.forEach((ordinal,i)=>ordinal!==undefined&&assert.areEqual(ordinal,plOrdinal.select(i),`Selecting ${i} for locale ${locale} with ordinal type`));
15
+
cardinals.forEach((cardinal,i)=>cardinal!==undefined&&assert.areEqual(cardinal,plCardinal.select(i),`Selecting ${i} for locale ${locale} with cardinal type`));
16
+
}
17
+
8
18
testRunner.runTests([
9
19
{
10
20
name: "Basic resolved options",
11
21
body(){
12
-
constpr=newIntl.PluralRules();
22
+
constpr=newIntl.PluralRules("en");
13
23
constopts=pr.resolvedOptions();
14
24
assert.areEqual("string",typeofopts.locale,"Locale should be the default locale");
15
25
assert.areEqual("cardinal",opts.type,"Default type should be cardinal");
@@ -24,7 +34,7 @@ testRunner.runTests([
24
34
if(WScript.Platform.ICU_VERSION>=61){
25
35
// In ICU 61+, uplrules_getKeywords became stable, so we can actually use it
26
36
// REVIEW(jahorto): In all locales, there should be at least a singular and plural category?
27
-
assert.isTrue(opts.pluralCategories.length>2,"pluralCategories should use uplrules_getKeywords");
37
+
assert.isTrue(opts.pluralCategories.length>=2,"pluralCategories should use uplrules_getKeywords");
28
38
}else{
29
39
assert.isTrue(opts.pluralCategories.length===1,"pluralCategories should not use uplrules_getKeywords");
0 commit comments