Skip to content

Inherit root context information in ShallowWrapper::shallow()#2296

Merged
ljharb merged 1 commit intoenzymejs:masterfrom
moward:fix#2290-shallow-provider
Dec 19, 2019
Merged

Inherit root context information in ShallowWrapper::shallow()#2296
ljharb merged 1 commit intoenzymejs:masterfrom
moward:fix#2290-shallow-provider

Conversation

@moward
Copy link
Copy Markdown

@moward moward commented Nov 26, 2019

Fixes #2290

@moward
Copy link
Copy Markdown
Author

moward commented Nov 26, 2019

@ljharb FYI

@moward
Copy link
Copy Markdown
Author

moward commented Dec 10, 2019

@ljharb could you please take a look? 😁

Copy link
Copy Markdown
Member

@ljharb ljharb left a comment

Choose a reason for hiding this comment

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

Thanks, this looks great!

* @returns {ShallowWrapper}
*/
dive(options = {}) {
dive(options) {
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

the options are optional, so the default value is correct (this change would change the length of the function)

Suggested change
dive(options) {
dive(options = {}) {

@ljharb ljharb force-pushed the fix#2290-shallow-provider branch from 6bc081c to 696a272 Compare December 19, 2019 06:29
@ljharb ljharb merged commit 696a272 into enzymejs:master Dec 19, 2019
ljharb added a commit that referenced this pull request Dec 20, 2019
New Stuff
 - `render`: handle Fiber strings and numbers (#2221)

Fixes
 - `shallow`: Share child context logic between `shallow` and `dive` (#2296)
 - `mount`: `children`: include text nodes ($2269)
 - `mount`: `invoke`: use adapter’s `wrapInvoke` if present (#2158)

Docs
 - `mount`/`shallow`: `closest`/`parent`: Add missing arguments description (#2264)
 - `mount`/`shallow`: fix pluralization of “exist” (#2262)
 - `shallow`/`mount`: `simulate`: added functional component example to simulate doc (#2248)
 - `mount`: `debug`: add missing verbose option flag (#2184)
 - `mount`/`shallow`: `update`: fix semantics description (#2194)
 - add missing backticks to linked method names (#2170)
 - `invoke`: Add missing backticks to end of codeblock (#2160)
 - `invoke`: Fix typo (#2167)
 - Explicit React CSS selector syntax description (#2178)

Meta Stuff
 - [meta] add `funding` field
 - [meta] Update airbnb.io URLs to use https (#2222)
 - [deps] update `is-boolean-object`, `is-callable`, `is-number-object`, `is-string`, `enzyme-shallow-equal`, `array.prototype.flat`, `function.prototype.name`, `html-element-map`, `is-r
egex`, `object-inspect`, `object-is`, `object.entries`, `object.vales`, `raf`, `string.prototype.trim`
 - [dev deps] update `eslint`, `eslint-plugin-import`, `eslint-plugin-markdown`, `eslint-plugin-react`, `safe-publish-latest`, `eslint-config-airbnb`, `rimraf`, `safe-publish-latest`, `k
arma-firefox-launcher`, `babel-preset-airbnb`, `glob-gitignore`, `semver`, `eslint-plugin-jsx-a11y`
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

ShallowWrapper::dive fails when diving into a memoized component inside a context provider

2 participants