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
In 2.14.2 I added a new :closure-defines {shadow.loader.TEST true} option you can set for your build to put the loader into test mode. That will just treat all modules as already loaded and any load call will always succeed. It assumes that you will require the code that would otherwise be loaded dynamically directly in your test.
Karma throws "Exception: Error: shadow.loader API was called before shadow.loader.init!" when
shadow.lazy
modules are used inside a tested functionExample
https://github.com/Valdermeyder/karma-modules-support
Workaround
Add js file with next content
to
karma.conf.js -> files
configurationYou can find exact code changes here
Probable solution
:target :karma
should support:module-loader true
configuration in the same way as:target :browser-test
does:shadow.loader
when:module-loader true
Versions
The text was updated successfully, but these errors were encountered: