Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add context introspection API to wrapper #152

Merged
merged 1 commit into from Feb 1, 2016
Merged

Add context introspection API to wrapper #152

merged 1 commit into from Feb 1, 2016

Conversation

blainekasten
Copy link
Contributor

Fixes #146.

Adds an API to shallow/mount wrappers called context based on the discussion in the above thread. The below now works.

wrapper.context() // returns context object
wrapper.context('foo') // returns foo off of context object

@@ -25,3 +25,5 @@ expect(wrapper.state('foo')).to.equal(10);

- [`.props() => Object`](props.md)
- [`.prop(key) => Any`](prop.md)
- [`.context(key) => Any`](context.md)
- [`.context(key) => Any`](context.md)
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

duplicate?

@blainekasten
Copy link
Contributor Author

Fixed!

@lelandrichardson
Copy link
Collaborator

@blainekasten remember to add the 2 lines in /docs/README.md or else gitbook won't add those pages to the docs site!

@blainekasten
Copy link
Contributor Author

Done.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
semver: minor New stuff.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants