1.0.2 • Published 7 years ago
wrap-context v1.0.2
React Context Provider
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