Support shallow rendering by using Marko taglibFinder.excludePackage()
Add module/package names to Jest globals marko-jest > taglibExcludePackages. All components from that module/package will be shallow rendered
Current limitations:
The shallow rendering will affect ALL test suites, you cannot turn it on or off during runtime. This is due to we cannot pass any options dynamically to Jest transformer during runtime (see https://github.com/facebook/jest/issues/5617).
You can only do shallow rendering on external modules. Unfortunately, you cannot do shallow rendering on any component from the same project. The only workaround so far is to separate your UI component as an external module (npm package) and consume it on your project.
Explore how to do shallow rendering on Marko.
Possible solutions:
taglibFinder.excludeDir()
ortaglibFinder. excludePackage ()
to prevent rendering nested components. See https://markojs.com/docs/custom-tags/#hiding-taglibs