mirror of
https://github.com/NodeBB/NodeBB.git
synced 2026-02-26 08:31:22 +01:00
feat: add test for custom translations
This commit is contained in:
@@ -322,4 +322,12 @@ describe('Translator static methods', function () {
|
|||||||
done();
|
done();
|
||||||
});
|
});
|
||||||
});
|
});
|
||||||
|
|
||||||
|
describe('add translation', function () {
|
||||||
|
it('should add custom translations', async function () {
|
||||||
|
shim.addTranslation('en-GB', 'my-namespace', { foo: 'a custom translation' });
|
||||||
|
const t = await shim.translate('this is best [[my-namespace:foo]]');
|
||||||
|
assert.strictEqual(t, 'this is best a custom translation');
|
||||||
|
});
|
||||||
|
});
|
||||||
});
|
});
|
||||||
|
|||||||
Reference in New Issue
Block a user