aboutsummaryrefslogblamecommitdiffstats
path: root/ui/lib/shallow-with-context.js
blob: cf83dd76e86d11ce04516955c42e745f38982073 (plain) (tree)
1
2
3
4
5
6
7






                                                              
import { shallow } from 'enzyme'

export default function (jsxComponent) {
  return shallow(jsxComponent, {
    context: { t: (str1, str2) => str2 ? str1 + str2 : str1 },
  })
}