1.0.2 • Published 7 years ago

wrap-context v1.0.2

Weekly downloads
7
License
MIT
Repository
github
Last release
7 years ago

React Context Provider

codecov Build Status

Sample wrapper for providing context in tests. Includes Typescript definitions and tests.

If you want to use this package, consider usage of enzyme

Usage

See in tests

import {wrapContext} from 'wrap-context';
const ReactContextProvider = wrapContext(YourComponent);

export default <ReactContextProvider context={{
    text: "Context your component will receive"
}}/>

Installing

Using NPM:

npm i --save-dev wrap-context

License

MIT