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

Weird problem with Karma and Angular #1093

Closed
MitchK opened this issue Jun 5, 2014 · 5 comments
Closed

Weird problem with Karma and Angular #1093

MitchK opened this issue Jun 5, 2014 · 5 comments

Comments

@MitchK
Copy link

MitchK commented Jun 5, 2014

I have included all my mandatory Angular libs in the karma.conf.js file

...
    // list of files / patterns to load in the browser
    files: [

      // Angular
      'src/bower/angular/angular.js',
      'src/bower/angular-resource/angular-resource.js',
      'src/bower/angular-route/angular-route.js',
      'src/bower/angular-bootstrap/ui-bootstrap.js',
      'src/bower/angular-mocks/angular-mocks.js',

      // Client source code
      'src/client/**/*.js',

      // Tests
      'src/tests/client/**/*.js'
    ],
...

And somehow factory is undefined. Any idea?

PALM00545424A:Hello-World user$ grunt karma:unit
Running "karma:unit" (karma) task
INFO [karma]: Karma v0.12.16 server started at http://localhost:9876/
INFO [launcher]: Starting browser PhantomJS
INFO [PhantomJS 1.9.7 (Mac OS X)]: Connected on socket RsBhDUyRydrTpN29XLtU with id 51675313
PhantomJS 1.9.7 (Mac OS X) ERROR
  TypeError: 'undefined' is not a function (evaluating 'module.factory')
@maksimr
Copy link
Contributor

maksimr commented Jun 5, 2014

@MitchK Hello.

Can you create gist with karma.conf.js and bower.json and test file, which reproduce this problem?
It seems the problem in a test file.
Thanks!

@MitchK
Copy link
Author

MitchK commented Jun 5, 2014

@btford
Copy link
Contributor

btford commented Jun 7, 2014

Do you ever define module? Like:

var module = angular.module('foo', []);

@pkozlowski-opensource
Copy link
Member

@MitchK do you have additional info regarding your issue? It is next to impossible to assist you further based on the description provided...

@pkozlowski-opensource
Copy link
Member

Closing as no response from @MitchK

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

No branches or pull requests

4 participants