Skip to content

Instantly share code, notes, and snippets.

View ashrithks's full-sized avatar

Ashrith K S ashrithks

  • Cisco Systems
  • Bangalore
View GitHub Profile
@danmakenoise
danmakenoise / test.js
Last active February 29, 2024 20:23
Unit Testing Children of React Context API Consumers with Enzyme
// Component.js
const Component = props => (
<MyContext.Consumer>
{(context) => (
<Foo
bar={props.bar}
baz={context.baz}
/>
)}
</MyContext.Consumer>