Files
habitica/test/client/unit/specs/libs/i18n.js
Matteo Pagliazzi d9d7c69432 Client: async resources, make store reusable, move plugins and add getTaskFor getter (#8575)
Add library to manage async resource
Make Store reusable for easier testing
Move plugin to libs
Add getTaskFor getter with tests
2017-03-18 18:33:08 +01:00

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