-
-
Notifications
You must be signed in to change notification settings - Fork 32.3k
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
TypeError running tests with Jasmine #39937
Comments
I have opened a pull request (#39942) |
After some debugging, this seems like an issue with the test runner and it's environment. When I just import it in node repl, the function is actually defined - sandbox node
Welcome to Node.js v18.18.2.
Type ".help" for more information.
> require('@mui/material/SvgIcon')
{
default: [Getter],
svgIconClasses: [Getter],
getSvgIconUtilityClass: [Getter]
}
> require('@mui/material/SvgIcon').getSvgIconUtilityClass(['hello'])
'MuiSvgIcon-hello' |
Sorry for the newbie question, but I am not sure if the problem is related to the configuration of the testing environment (it is obvious to think so), I have tried many configuration options (Webpack + babel/ts-loader + tsconfig) and the problem persists 😢. Does anyone have any idea what the problem might be, how to solve it, or can throw any hints or tips? |
@brijeshb42, do you have any details from your investigation? |
@michaldudak I don't have it right now. But I just downloaded the codesandbox locally to test. |
This may be fixed by EMS distribution improvements being worked on by @DiegoAndai in #41596 |
Duplicates
Latest version
Steps to reproduce 🕹
Link to live example: https://codesandbox.io/p/sandbox/jasmine-error-lmnhhk
Steps:
Current behavior 😯
I get this error:
Expected behavior 🤔
Tests run correctly
Context 🔦
I want to use Jasmine for testing...
If I edit the
node_modules/@mui/utils/esm/composeClasses/composeClasses.js
file in the following way, all problems disappear...Your environment 🌎
npx @mui/envinfo
The text was updated successfully, but these errors were encountered: