ionic-framework
ionic-framework copied to clipboard
bug: Cannot read properties of undefined (reading 'includes')
Prerequisites
- [X] I have read the Contributing Guidelines.
- [X] I agree to follow the Code of Conduct.
- [X] I have searched for existing issues that already report this problem, without success.
Ionic Framework Version
v8.x
Current Behavior
I can't run my test due to this error:
⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯ Unhandled Rejection ⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯ TypeError: Cannot read properties of undefined (reading 'includes') ❯ addStyle node_modules/@stencil/core/internal/client/index.js:691:104 ❯ attachStyles node_modules/@stencil/core/internal/client/index.js:702:20 ❯ updateComponent node_modules/@stencil/core/internal/client/index.js:1500:5 ❯ node_modules/@stencil/core/internal/client/index.js:1490:38 ❯ enqueue node_modules/@stencil/core/internal/client/index.js:1492:88 ❯ dispatchHooks node_modules/@stencil/core/internal/client/index.js:1490:10 ❯ Array.dispatch node_modules/@stencil/core/internal/client/index.js:1454:26 ❯ consume node_modules/@stencil/core/internal/client/index.js:3018:16 ❯ flush node_modules/@stencil/core/internal/client/index.js:3060:5 ❯ invokeTheCallbackFunction node_modules/jsdom/lib/jsdom/living/generated/Function.js:19:26
Expected Behavior
I should be able to run tests
Steps to Reproduce
- Clone this repo: https://github.com/erperejildo/myPayslips
- run
npm run test.unit
Code Reproduction URL
https://github.com/erperejildo/myPayslips
Ionic Info
Ionic:
Ionic CLI : 7.2.0 (C:\Users\Dani\AppData\Roaming\npm\node_modules\@ionic\cli)
Ionic Framework : @ionic/react 8.2.2
Capacitor:
Capacitor CLI : 6.1.0
@capacitor/android : 6.1.0
@capacitor/core : 6.1.0
@capacitor/ios : 6.1.0
Utility:
cordova-res : not installed globally
native-run : 2.0.1
System:
NodeJS : v20.12.2 (C:\Program Files\nodejs\node.exe)
npm : 10.5.2
OS : Windows 10
Additional Information
I don't have any includes in my component as you can check in the repo. Would it be possible to remove vitest and use just jest?
The test itself doesn't fail as you can see:
but it's annoying since it shows 35 errors
Thank you for submitting the issue!
I'm not able to access the repro. Please verify that it's been given public access.
Also, there's a new release for Ionic Framework that might have fixed it. I would also recommend updating the latest version. We fixed a bug that might be similar to this one.
Thank you for submitting the issue!
I'm not able to access the repro. Please verify that it's been given public access.
Also, there's a new release for Ionic Framework that might have fixed it. I would also recommend updating the latest version. We fixed a bug that might be similar to this one.
Fixed. Ok, I will try later
I have access to the repo now, thanks! However, I'm unable to reproduce the issue. npm run test.unit passes without any issues. Please, confirm on your end?
Thanks for the issue! This issue is being closed due to the lack of a reply. If this is still an issue with the latest version of Ionic, please create a new issue and ensure the template is fully filled out.
Thank you for using Ionic!