wrap-context

1.0.2 • Public • Published

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

Package Sidebar

Install

npm i wrap-context

Weekly Downloads

0

Version

1.0.2

License

MIT

Last publish

Collaborators

  • horat1us