mirror of
https://github.com/HabitRPG/habitica.git
synced 2025-12-16 22:27:26 +01:00
Add library to manage async resource Make Store reusable for easier testing Move plugin to libs Add getTaskFor getter with tests
19 lines
482 B
JavaScript
19 lines
482 B
JavaScript
import i18n from 'client/libs/i18n';
|
|
import commoni18n from 'common/script/i18n';
|
|
import Vue from 'vue';
|
|
|
|
describe('i18n plugin', () => {
|
|
before(() => {
|
|
Vue.use(i18n);
|
|
});
|
|
|
|
it('adds $t to Vue.prototype', () => {
|
|
expect(Vue.prototype.$t).to.be.a.function;
|
|
});
|
|
|
|
it('$t is a proxy for common/i18n.t', () => {
|
|
const result = (new Vue()).$t('reportBug');
|
|
expect(result).to.equal(commoni18n.t('reportBug'));
|
|
expect(result).to.equal('Report a Bug');
|
|
});
|
|
}); |