linemanjs / lineman

Lineman helps you build fat-client JavaScript apps. It produces happiness by building assets, mocking servers, running specs on every file change
MIT License
1.18k stars 82 forks source link

lineman spec failes when phantomjs is installed and setup as runner (AngularJS project) #382

Closed tirithen closed 8 years ago

tirithen commented 9 years ago

I have been having this problem for a while now and it prevents me from hooking up the front end tests to my current projects CI server.

TEST'EM 'SCRIPTS!                                                         
Open the URL below in a browser to connect.                               
http://localhost:7357/                                                    
━━━━━━━━━━━━━━┓                                                           
 PhantomJS 1.9┃                                                           
    0/14 ✘    ┃                                                           
              ┗━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
FlashMessageService #getById should not return any message when no message
 has assigned id.
    ✘ Error: [$injector:modulerr] Failed to instantiate module app due to:
    Error: [$injector:nomod] Module 'app' is not available! You either mis
spelled the module name or forgot to load it. If registering a module ensu
re that you specify the dependencies as the second argument.
    http://errors.angularjs.org/1.4.7/$injector/nomod?p0=app
        at http://localhost:7357/generated/js/app.js:5320
        at ensure (http://localhost:7357/generated/js/app.js:5242)
        at module (http://localhost:7357/generated/js/app.js:5570)
        at http://localhost:7357/generated/js/app.js:7722
        at forEach (http://localhost:7357/generated/js/app.js:3668)
        at loadModules (http://localhost:7357/generated/js/app.js:7748)
        at createInjector (http://localhost:7357/generated/js/app.js:7631)
        at workFn (http://localhost:7357/generated/js/spec.js:2427)
TypeError: 'undefined' is not a function (evaluating 'function(n) {
        return n = n.split('='), this[n[0]] = n[1], this;
      }.bind({})') at http://localhost:7357/generated/js/app.js, line 6426
8

[Press ENTER to run tests; q to quit]         

If I uninstall phantomjs it says that it waits for runners and if I open the link all tests complete properly in Firefox or Chomium. Why are they breaking with PhantomJS? Are there some problem with the spec/helpers/angular-mocks.js not beeing included when running with PhantomJS? How can I debug this?

searls commented 9 years ago

I'm sorry that I can't address the particularities of Angular mocks or hope to repro this on my own. Can you post a minimal project that reproduces it?

cc/ @davemo