I have upgraded my ionic app to v6 and followed the steps from the documentation. I have updated the below modules to use v6
“@ionic /core”: “6”,
“@ionic /react”: “6”,
“@ionic /react-router”: “6”,
And I have also updated the --transformIgnorePatterns in the jest config and also tried in package.json along with the setupIonicReact().
All the functionalities are working fine after this update but for some reason the jest tests are failing.
Reason for failure - Jest snapshots are fllled up with the DOM fibernodes which end up not having enough space for the snapshot.
opened 04:54PM - 19 Nov 21 UTC
closed 07:59PM - 19 Nov 21 UTC
triage
### Prerequisites
- [X] I have read the [Contributing Guidelines](https://githu… b.com/ionic-team/ionic-framework/blob/main/.github/CONTRIBUTING.md#creating-an-issue).
- [X] I agree to follow the [Code of Conduct](https://ionicframework.com/code-of-conduct).
- [X] I have searched for [existing issues](https://github.com/ionic-team/ionic-framework/issues) that already report this problem, without success.
### Ionic Framework Version
- [ ] v4.x
- [ ] v5.x
- [X] v6.x
### Current Behavior
I wrote a simple test that uses Jest, Babel and Ionic 5 (latest as of November 19, 2021, version 5.9.1):
https://github.com/milang/ionic-simplevitejs/blob/jest-ionic5/src/App.test.tsx
This test works without issues:

However, after upgrading to Ionic 6 (and strictly controlling the changes -- not touching anything else, i.e. with identical Jest, Jest-settings, Babel, Babel-settings, test itself), Jest suddenly starts failing with the following error:
https://github.com/milang/ionic-simplevitejs/tree/jest-ionic6

I tried different recommended approaches for getting ESM modules working with Jest, but all failed (and there is also the question of why does the current Jest/Babel configuration work fine with Ionic 5 package).
### Expected Behavior
The test should continue working after upgrading to Ionic 6, or there should at least be guidance for how should Jest/Babel configuration be updated to continue running tests with Ionic 6.
### Steps to Reproduce
Working version is in the `jest-ionic5` branch:
```sh
cd /work/directory
git clone https://github.com/milang/ionic-simplevitejs.git
git checkout jest-ionic5
yarn && yarn run test # => success
```
Non-working, Ionic 6 (RC3) version is in the `jest-ionic6` branch. This branch adds a single commit that only changes Ionic version in `package.json` (plus related lock-file and README changes), nothing else:
```sh
git checkout jest-ionic6
yarn && yarn run test # => failure
```
### Code Reproduction URL
https://github.com/milang/ionic-simplevitejs/tree/jest-ionic6
### Ionic Info
_No response_
### Additional Information
_No response_
This issue is discussed here but I am not seeing any solution.