UNPKG

admin-on-rest-fr05t1k

Version:

A frontend Framework for building admin applications on top of REST services, using ES6, React and Material UI

15 lines (11 loc) 429 B
import assert from 'assert'; import React from 'react'; import translate from './translate'; describe('translate HOC', () => { it('should conserve base component default props', () => { const Component = () => <div />; Component.defaultProps = { foo: 'bar' }; const TranslatedComponent = translate(Component); assert.deepEqual(TranslatedComponent.defaultProps, { foo: 'bar' }); }); });