I have an issue with dependent objects and Karma testing.
For example I would like to test method: window.SuperObject.someMethod(), but before I must define class window.SuperObject. Issue begins when I define superclass in first script file, and method in other script file. Actually there are huge amount of methods distributed in different js files and dependencies between them.
I tried Webpack + Karma, but it doesn't solve the problem (Webpack merge my 2 test scripts in 1 script). But I got again error
"proccess encountered a declaration exception FAILED",
"TypeError: window.SuperObject" is not a constructor.
Hope someone knows where to dig or what to do.... Thank you.
Aucun commentaire:
Enregistrer un commentaire