mirror of
https://github.com/TryGhost/Ghost.git
synced 2024-12-28 05:14:12 +03:00
30 lines
592 B
JavaScript
30 lines
592 B
JavaScript
|
const assert = require('assert');
|
||
|
|
||
|
const i18n = require('../');
|
||
|
|
||
|
describe('Can translate', function () {
|
||
|
describe('Dutch', function () {
|
||
|
let t;
|
||
|
|
||
|
before(function () {
|
||
|
t = i18n('nl').t;
|
||
|
});
|
||
|
|
||
|
it('can translate Dutch', function () {
|
||
|
assert.equal(t('Hello'), 'Hallo');
|
||
|
});
|
||
|
});
|
||
|
|
||
|
describe('English', function () {
|
||
|
let t;
|
||
|
|
||
|
before(function () {
|
||
|
t = i18n('en').t;
|
||
|
});
|
||
|
|
||
|
it('can translate English', function () {
|
||
|
assert.equal(t('Hello'), 'Hello');
|
||
|
});
|
||
|
});
|
||
|
});
|