{"action":"created","issue":{"url":"https://api.github.com/repos/Swiip/generator-gulp-angular/issues/188","labels_url":"https://api.github.com/repos/Swiip/generator-gulp-angular/issues/188/labels{/name}","comments_url":"https://api.github.com/repos/Swiip/generator-gulp-angular/issues/188/comments","events_url":"https://api.github.com/repos/Swiip/generator-gulp-angular/issues/188/events","html_url":"https://github.com/Swiip/generator-gulp-angular/issues/188","id":52229920,"number":188,"title":"Unit tests fail with Module Unavailable errors","user":{"login":"tlvince","id":323761,"avatar_url":"https://avatars.githubusercontent.com/u/323761?v=3","gravatar_id":"","url":"https://api.github.com/users/tlvince","html_url":"https://github.com/tlvince","followers_url":"https://api.github.com/users/tlvince/followers","following_url":"https://api.github.com/users/tlvince/following{/other_user}","gists_url":"https://api.github.com/users/tlvince/gists{/gist_id}","starred_url":"https://api.github.com/users/tlvince/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/tlvince/subscriptions","organizations_url":"https://api.github.com/users/tlvince/orgs","repos_url":"https://api.github.com/users/tlvince/repos","events_url":"https://api.github.com/users/tlvince/events{/privacy}","received_events_url":"https://api.github.com/users/tlvince/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":7,"created_at":"2014-12-17T11:34:46Z","updated_at":"2015-02-11T18:03:23Z","closed_at":null,"body":"As per #162, `gulp test` is failing given a directory structure like:\r\n\r\n```\r\nsrc\r\n├── 404.html\r\n├── app\r\n│   ├── definitions\r\n│   │   ├── definitions.controller.js\r\n│   │   ├── definitions.html\r\n│   │   ├── definitions.module.js\r\n│   │   ├── definitions.service.js\r\n│   │   └── definitions.states.js\r\n│   ├── index.css\r\n│   ├── index.html\r\n│   ├── index.js\r\n│   └── index.states.js\r\n├── components\r\n│   └── navbar\r\n│       ├── navbar.controller.js\r\n│       └── navbar.html\r\n├── favicon.ico\r\n└── index.html\r\n```\r\n\r\nWith karma `logLevel: 'debug'`:\r\n\r\n```\r\n[11:27:16] Starting 'test'...\r\n[11:27:17] Starting Karma server...\r\n\u001B[36mDEBUG [plugin]: \u001B[39mLoading plugin karma-phantomjs-launcher.\r\n\u001B[36mDEBUG [plugin]: \u001B[39mLoading plugin karma-jasmine.\r\n\u001B[32mINFO [karma]: \u001B[39mKarma v0.12.28 server started at http://localhost:9876/\r\n\u001B[32mINFO [launcher]: \u001B[39mStarting browser PhantomJS\r\n\u001B[36mDEBUG [temp-dir]: \u001B[39mCreating temp dir at /var/folders/_n/vc1rw4250cbb96q5pfkflndw0000gn/T/karma-47907728\r\n\u001B[36mDEBUG [launcher]: \u001B[39m/usr/local/bin/phantomjs /var/folders/_n/vc1rw4250cbb96q5pfkflndw0000gn/T/karma-47907728/capture.js\r\n\u001B[36mDEBUG [watcher]: \u001B[39mResolved files:\r\n\tapp/node_modules/jasmine-core/lib/jasmine-core/jasmine.js\r\n\tapp/node_modules/karma-jasmine/lib/boot.js\r\n\tapp/node_modules/karma-jasmine/lib/adapter.js\r\n\tapp/bower_components/angular/angular.js\r\n\tapp/bower_components/angular-ui-router/release/angular-ui-router.js\r\n\tapp/bower_components/angular-bootstrap/ui-bootstrap-tpls.js\r\n\tapp/bower_components/angular-toastr/dist/angular-toastr.js\r\n\tapp/bower_components/angular-resource/angular-resource.js\r\n\tapp/bower_components/angular-mocks/angular-mocks.js\r\n\tapp/src/components/navbar/navbar.controller.js\r\n\tapp/src/components/navbar/navbar.module.js\r\n\tapp/src/components/navbar/navbar.service.js\r\n\u001B[36mDEBUG [web-server]: \u001B[39mserving: app/node_modules/karma/static/client.html\r\n\u001B[36mDEBUG [web-server]: \u001B[39mserving: app/node_modules/karma/static/karma.js\r\n\u001B[36mDEBUG [web-server]: \u001B[39mupgrade /socket.io/1/websocket/kK9zm-CogAweHsMyAIoJ\r\n\u001B[36mDEBUG [karma]: \u001B[39mA browser has connected on socket kK9zm-CogAweHsMyAIoJ\r\n\u001B[32mINFO [PhantomJS 1.9.8 (Mac OS X)]: \u001B[39mConnected on socket kK9zm-CogAweHsMyAIoJ with id 47907728\r\n\u001B[36mDEBUG [launcher]: \u001B[39mPhantomJS (id 47907728) captured in 7.882 secs\r\n\u001B[36mDEBUG [web-server]: \u001B[39mserving: app/node_modules/karma/static/context.html\r\n\u001B[36mDEBUG [web-server]: \u001B[39mserving (cached): app/node_modules/jasmine-core/lib/jasmine-core/jasmine.js\r\n\u001B[36mDEBUG [web-server]: \u001B[39mserving (cached): app/node_modules/karma-jasmine/lib/boot.js\r\n\u001B[36mDEBUG [web-server]: \u001B[39mserving (cached): app/bower_components/angular-toastr/dist/angular-toastr.js\r\n\u001B[36mDEBUG [web-server]: \u001B[39mserving (cached): app/bower_components/angular-resource/angular-resource.js\r\n\u001B[36mDEBUG [web-server]: \u001B[39mserving (cached): app/bower_components/angular-bootstrap/ui-bootstrap-tpls.js\r\n\u001B[36mDEBUG [web-server]: \u001B[39mserving (cached): app/bower_components/angular-mocks/angular-mocks.js\r\n\u001B[36mDEBUG [web-server]: \u001B[39mserving (cached): app/src/components/navbar/navbar.controller.js\r\n\u001B[36mDEBUG [web-server]: \u001B[39mserving (cached): app/src/components/navbar/navbar.module.js\r\n\u001B[36mDEBUG [web-server]: \u001B[39mserving (cached): app/bower_components/angular-ui-router/release/angular-ui-router.js\r\n\u001B[36mDEBUG [web-server]: \u001B[39mserving (cached): app/bower_components/angular/angular.js\r\n\u001B[36mDEBUG [web-server]: \u001B[39mserving (cached): app/node_modules/karma-jasmine/lib/adapter.js\r\n\u001B[36mDEBUG [web-server]: \u001B[39mserving (cached): app/src/components/navbar/navbar.service.js\r\n\u001B[31mPhantomJS 1.9.8 (Mac OS X) ERROR\u001B[39m\r\n  Error: [$injector:nomod] Module 'navbar' 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.\r\n  http://errors.angularjs.org/1.3.6/$injector/nomod?p0=navbar\r\n  at app/bower_components/angular/angular.js:1753\r\n```\r\n\r\nNote `navbar.controller.js` is being loaded before `navbar.module.js`.\r\n\r\n```\r\n[web-server]: \u001B[serving (cached): app/src/components/navbar/navbar.controller.js\r\n\u001B[web-server]: \u001B[serving (cached): app/src/components/navbar/navbar.module.js\r\n```\r\n\r\n---\r\n\r\nIn this case, simply adding `.pipe($.angularFilesort())` after `gulp.src` won't work because it includes Bower deps, which it seems to get confused by.\r\n\r\nCan we split the `src` stream and only apply angular-filesort to everything under `/src`?\r\n\r\nv0.7.3"},"comment":{"url":"https://api.github.com/repos/Swiip/generator-gulp-angular/issues/comments/73930735","html_url":"https://github.com/Swiip/generator-gulp-angular/issues/188#issuecomment-73930735","issue_url":"https://api.github.com/repos/Swiip/generator-gulp-angular/issues/188","id":73930735,"user":{"login":"tlvince","id":323761,"avatar_url":"https://avatars.githubusercontent.com/u/323761?v=3","gravatar_id":"","url":"https://api.github.com/users/tlvince","html_url":"https://github.com/tlvince","followers_url":"https://api.github.com/users/tlvince/followers","following_url":"https://api.github.com/users/tlvince/following{/other_user}","gists_url":"https://api.github.com/users/tlvince/gists{/gist_id}","starred_url":"https://api.github.com/users/tlvince/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/tlvince/subscriptions","organizations_url":"https://api.github.com/users/tlvince/orgs","repos_url":"https://api.github.com/users/tlvince/repos","events_url":"https://api.github.com/users/tlvince/events{/privacy}","received_events_url":"https://api.github.com/users/tlvince/received_events","type":"User","site_admin":false},"created_at":"2015-02-11T18:03:23Z","updated_at":"2015-02-11T18:03:23Z","body":"Its all yours :smile:"}}