-
Notifications
You must be signed in to change notification settings - Fork 108
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
Code Instrumentation of micro frontends are not take into account #616
Comments
Just initializing the In fact, the reference of the object is kept by cypress |
Thanks @jogelin, it fixed my issue. |
Can you please provide an example? How did you initialize the |
+1
|
Describe the bug
I have an application that follows the micro-frontends architecture. It means that some parts of the application are bundled separately and loaded in async mode.
I would like to see the code covered in my micro frontend. However, when debugging cypress coverage, I see the
window.__coverage__
is undefined because the application is loaded but not the micro-frontend yet.If debug and check the
window.__coverage__
of the cypress iframe a bit later, it is filled correctly.Is there a way to delay or restart the coverage configuration when we know that the page is ready? In our visit command per example?
Sequence
Coverage correctly configured:
Visit the application page and load the main page:
Debug the
beforeEach
hook that is configuring the call tosaveCoverageObject
function when the window object is loaded:No instrumentation loaded (yet) because the micro-frontend is not yet loaded
Load of the micro-frontend with the instrumentation
Log the
window.__coverage__
in the console ---> contains all pathsTest successful!
Versions
Configs
Instrumentation of the code using
babel-plugin-istanbul
:nyc.config.js
:DEBUG
The text was updated successfully, but these errors were encountered: