wrap-context
v1.0.2
Published
React Context Provider for tests (TypeScript)
Downloads
12
Readme
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