Sha256: c3be2ac34a2aa2de599c2b2b3a8c3510e692295837aa7b33d704c8f856bb6a23

Contents?: true

Size: 432 Bytes

Versions: 2

Compression:

Stored size: 432 Bytes

Contents

import I18nResolver from 'resolvers/i18n_resolver';

import sinon from 'sinon';

describe('I18nResolver', () => {
  it('provides translate function for entry locale', () => {
    window.I18n = {
      t: sinon.spy()
    };

    var seed = {
      locale: 'fr'
    };
    var resolver = new I18nResolver();

    resolver.get({}, seed).t('some.key');

    expect(I18n.t).to.have.been.calledWith('some.key', {locale: 'fr'});
  });
});

Version data entries

2 entries across 2 versions & 1 rubygems

Version Path
pageflow-react-0.1.1 js/spec/resolvers/i18n_resolver_spec.js
pageflow-react-0.1.0 js/spec/resolvers/i18n_resolver_spec.js