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
Hello everyone, I want to ask a question regarding unit testing on vite-plugin-federation using vitest. I'm confused, maybe doing unit testing on remote applications (exposing components) is possible, because we only need to make unit tests on each component that will be exposed. However, when we want to see the suitability of the exposed component results in the host application (which consumes the component), is it possible to do a simple async and create a unit test for the component?
I tried once, but it didn't go well.
Error: Uncaught [Error: Failed to load url http://localhost:3000/assets/remoteEntry.js (resolved id: http://localhost:3000/assets/remoteEntry.js). Does the file exist?]
Basically I just called a regular component using lazy import and suspense, but it seems that when it is called from federation, it needs different treatment. Can anyone help me on this?
reacted with thumbs up emoji reacted with thumbs down emoji reacted with laugh emoji reacted with hooray emoji reacted with confused emoji reacted with heart emoji reacted with rocket emoji reacted with eyes emoji
-
Hello everyone, I want to ask a question regarding unit testing on vite-plugin-federation using vitest. I'm confused, maybe doing unit testing on remote applications (exposing components) is possible, because we only need to make unit tests on each component that will be exposed. However, when we want to see the suitability of the exposed component results in the host application (which consumes the component), is it possible to do a simple async and create a unit test for the component?
I tried once, but it didn't go well.
Basically I just called a regular component using lazy import and suspense, but it seems that when it is called from federation, it needs different treatment. Can anyone help me on this?
Beta Was this translation helpful? Give feedback.
All reactions