Skip to content
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

Error in karma testing #122

Closed
miganga opened this issue Jan 27, 2015 · 8 comments
Closed

Error in karma testing #122

miganga opened this issue Jan 27, 2015 · 8 comments
Labels

Comments

@miganga
Copy link

miganga commented Jan 27, 2015

I am getting this error in Karma while testing

Error: [$injector:modulerr] Failed to instantiate module *** due to:
Error: [$injector:modulerr] Failed to instantiate module oc.lazyLoad due to:
No module found during bootstrap, unable to init ocLazyLoad

This is my angular init:

angular.module('***', [
'oc.lazyLoad',
'ui.router',
'ngResource',
'pascalprecht.translate',
'ngAnimate',
'ui.bootstrap',
'tmh.dynamicLocale'
])
.run(function($rootScope, $state, $stateParams, $window) {

});
@ocombe
Copy link
Owner

ocombe commented Jan 27, 2015

This is fix in the current master file (see #111), but there is no release for it yet.
Could you try the file in the current src folder and tell me if it's ok with you ?
I'll make a new release soon (fixing a bunch of stuff before).

@miganga
Copy link
Author

miganga commented Jan 27, 2015

Yes, just pass the first test :)

@dcorraldiaz
Copy link

I have the same problem in karma test execution.
I have tried to add the ocLazyLoad.js from src source, and does not fix the problem.

When executing tests, I test more than one application at the same time (because the continuous integration process must analize them together).
In order to get it, in unit test I'm pausing the bootstrap phase to avoid the apps bootstrap collision.
Maybe the problem is related to this?
http://code.angularjs.org/1.2.1/docs/guide/bootstrap#overview_deferred-bootstrap
(window.name = 'NG_DEFER_BOOTSTRAP!')

@ocombe
Copy link
Owner

ocombe commented Feb 18, 2015

Hmm yes that might be a problem. Is it possible to have a small test case somewhere?

@ocombe
Copy link
Owner

ocombe commented Feb 18, 2015

Anyway the new version I'm working on should throw a warning and not an error because I can't take all the use cases into account :)

@dcorraldiaz
Copy link

Sorry, but is complicated to write a small test.
I will wait for the next version of the lib.
Thanks.

@ocombe
Copy link
Owner

ocombe commented Feb 26, 2015

It should be fixed in 0.6.0!

@ocombe ocombe added the bug label Feb 26, 2015
@miganga
Copy link
Author

miganga commented Mar 5, 2015

great, thanks. will check

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

3 participants