]> BookStack Code Mirror - bookstack/blobdiff - resources/js/services/__tests__/translations.test.ts
Comments: Fixed pointer display, Fixed translation test
[bookstack] / resources / js / services / __tests__ / translations.test.ts
index 043f1745ff675e3f81d665e0b1f185cb1ae0d0a0..5014051ab0434274ce5bf564f57058d8a0a75faa 100644 (file)
@@ -58,6 +58,11 @@ describe('Translations Service', () => {
             expect(caseB).toEqual('an orange angry big dinosaur');
         });
 
+        test('it provides count as a replacement by default', () => {
+            const caseA = $trans.choice(`:count cats|:count dogs`, 4);
+            expect(caseA).toEqual('4 dogs');
+        });
+
         test('not provided replacements are left as-is', () => {
             const caseA = $trans.choice(`An :a dog`, 5, {});
             expect(caseA).toEqual('An :a dog');