You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
* fix: remove mountHook function for React
* fix: remove `unmount` from @cypress/react exports
* fix: remove `unmount` from the @cypress/react readme
* fix: don't alias React components on mount
* fix: remove `mountCallback` from Vue adapters
* fix: remove style injection utility functions from `mount-utils`
* fix: fix React tests
* fix: fix more React tests
* fix: fix more tests
* fix: fix screenshot test styles
* fix: update documentation around mount-utils styles; fix tests
* fix: update Vue docs to use `props` key rather than `propsData`
* fix: add test styles back in
* update unmount test and export getContainerEl for back compat
* better errors
* docs
* error for unmount
* test for error
* fix last test
* adjust language to reflect removed methods
* one last deprecation
* fix error
* wip - [skip ci]
* use proxy to catch errors
* deprecate alias
* update tests
* update on link
* use on links properly
* revert changes
Co-authored-by: Lachlan Miller <lachlan.miller.1990@outlook.com>
throwError(`No element found that matches selector ${ROOT_SELECTOR}. Please add a root element with data-cy-root attribute to your "component-index.html" file so that Cypress can attach your component to the DOM.`)
50
11
}
51
12
52
-
/**
53
-
* Remove any style or extra link elements from the iframe placeholder
See [docs/styles.md](./docs/styles.md) for full list of options.
82
67
```
83
68
84
69
You may also specify the `ReactDOM` package to use. This can be useful in complex monorepo setups that have different versions of React and React DOM installed. If you see an error relating to [mismatching versions of React or React DOM](https://reactjs.org/warnings/invalid-hook-call-warning.html#mismatching-versions-of-react-and-react-dom), this may be the solution. You can do this using the `ReactDom` option:
@@ -87,12 +72,7 @@ You may also specify the `ReactDOM` package to use. This can be useful in comple
87
72
// if you have multiple versions of ReactDom in your monorepo
-[counter-with-hooks.spec.js](counter-with-hooks.spec.js) and [counter2-with-hooks.spec.js](counter2-with-hooks.spec.js) test React components that uses hooks
4
-
-[use-counter.spec.js](use-counter.spec.js) shows how to test a React hook using `mountHook` function
5
-
6
-

7
-
8
-
Note: hooks are mounted inside a test component following the approach shown in [react-hooks-testing-library](https://github.com/testing-library/react-hooks-testing-library/blob/master/src/pure.js)
3
+
-[counter-with-hooks.spec.js](counter-with-hooks.spec.js) and [counter2-with-hooks.spec.js](counter2-with-hooks.spec.js) test React components that uses hooks
0 commit comments