jeudi 21 septembre 2017

dotenv cause karma test failed

When I use require('dotenv').config() in karmar.conf.js to test Angularjs, got this error:

Uncaught Error: [$injector:nomod] Module 'app' is not available! You either misspelled the module name or forgot to load it. If registering a module ensure that you specify the dependencies as the second argument.

But if delete this line, everything seems OK.

It's hard to figure it out. Does anybody encounter this situation?

Aucun commentaire:

Enregistrer un commentaire