Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
it('should work as a function when given two arguments', () => {
let TestClass = () => <div>;
let IntlTestClass = intl(TestClass, options);
expect().to.equal(
);
});
</div>
it('should be a function', () => {
let Wrapped = intl(options)(sinon.spy());
expect(Wrapped.getWrappedComponent).to.be.a('function');
});
it('should accept a CSV of keys', () => {
const Child = sinon.stub().returns(<div>);
const Wrapped = withText('foo,bar,baz')(Child);
rndr(
);
expect(Child).to.have.been.calledOnce.and.calledWithMatch({ foo: '1', bar: '2', baz: '3' });
});
</div>
export function t_r(id, language = '', fields = {}, plural = null, fallback = '') {
return translate(id, language, I18N_DEFINITION_REQUESTS, fields, plural, fallback);
}
export default function t(id, scope = '', fields = {}, plural = null, fallback = '') {
return translate(id, scope, I18N_DEFINITION, fields, plural, fallback);
}