1
0
mirror of https://github.com/BookStackApp/BookStack.git synced 2025-07-30 04:23:11 +03:00

Comments: Fixed pointer display, Fixed translation test

This commit is contained in:
Dan Brown
2025-05-13 12:03:15 +01:00
parent 8f92b6f21b
commit 32b29fcdfc
4 changed files with 16 additions and 13 deletions

View 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');