2017-02-03 23 views
0

正常にビルドされたが、クライアント側ですべてのテストに失敗するJHipster sample appをビルドしました(gulp test)JHipsterサンプルアプリケーションはすべてのテストで失敗します

のようなトレースで非常に多くの行があります。

PhantomJS 2.1.1 (Mac OS X 0.0.0): Executed 0 of 43 SUCCESS (0 secs/0 secs) 
PhantomJS 2.1.1 (Mac OS X 0.0.0) Controller Tests ActivationController calls Auth.activateAccount with the key from stateParams FAILED 
     src/main/webapp/bower_components/angular/angular.js:9:139615 
     [email protected]/main/webapp/bower_components/angular/angular.js:9:7090 
     [email protected]/main/webapp/bower_components/angular/angular.js:9:136826 
     [email protected]/main/webapp/bower_components/angular/angular.js:9:132232 
     [email protected]/main/webapp/bower_components/angular-mocks/angular-mocks.js:9:157942 
     [email protected]/main/webapp/bower_components/angular-mocks/angular-mocks.js:9:156451 
     [email protected]/test/javascript/spec/helpers/httpBackend.js:9:113 
     [email protected]://localhost:9876/context.js:151:17 
     src/main/webapp/bower_components/angular/angular.js:9:139615 
     [email protected]/main/webapp/bower_components/angular/angular.js:9:7090 
     [email protected]/main/webapp/bower_components/angular/angular.js:9:136826 
     [email protected]/main/webapp/bower_components/angular/angular.js:9:132232 
     [email protected]/main/webapp/bower_components/angular-mocks/angular-mocks.js:9:157942 
     [email protected]/main/webapp/bower_components/angular-mocks/angular-mocks.js:9:156451 
     [email protected]/test/javascript/spec/helpers/httpBackend.js:9:375 
     [email protected]://localhost:9876/context.js:151:17 
     src/main/webapp/bower_components/angular/angular.js:9:139615 
     [email protected]/main/webapp/bower_components/angular/angular.js:9:7090 
     [email protected]/main/webapp/bower_components/angular/angular.js:9:136826 
     [email protected]/main/webapp/bower_components/angular/angular.js:9:132232 
     [email protected]/main/webapp/bower_components/angular-mocks/angular-mocks.js:9:157942 
     [email protected]://localhost:9876/context.js:151:17 
     TypeError: undefined is not an object (evaluating 'MockAuth.activateAccount') in src/test/javascript/spec/app/account/activate/activate.controller.spec.js (line 9) 
     src/test/javascript/spec/app/account/activate/activate.controller.spec.js:9:2014 
     [email protected]://localhost:9876/context.js:151:17 
^[[1A^[[2KPhantomJS 2.1.1 (Mac OS X 0.0.0) Controller Tests ActivationController calls Auth.activateAccount with the key from stateParams FAILED 
     src/main/webapp/bower_components/angular/angular.js:9:139615 

は、最後の行は、次のとおりです。

ESC[1AESC[2KPhantomJS 2.1.1 (Mac OS X 0.0.0) Service Tests Auth should call backend on logout then call authServerProvider.logout FAILED 
     src/main/webapp/bower_components/angular/angular.js:9:139615 
     [email protected]/main/webapp/bower_components/angular/angular.js:9:7090 
     [email protected]/main/webapp/bower_components/angular/angular.js:9:136826 
     [email protected]/main/webapp/bower_components/angular/angular.js:9:132232 
     [email protected]/main/webapp/bower_components/angular-mocks/angular-mocks.js:9:157942 
     [email protected]/main/webapp/bower_components/angular-mocks/angular-mocks.js:9:156451 
     [email protected]/test/javascript/spec/helpers/httpBackend.js:9:113 
     src/main/webapp/bower_components/angular/angular.js:9:139615 
     [email protected]/main/webapp/bower_components/angular/angular.js:9:7090 
     [email protected]/main/webapp/bower_components/angular/angular.js:9:136826 
     [email protected]/main/webapp/bower_components/angular/angular.js:9:132232 
     [email protected]/main/webapp/bower_components/angular-mocks/angular-mocks.js:9:157942 
     [email protected]/main/webapp/bower_components/angular-mocks/angular-mocks.js:9:156451 
     [email protected]/test/javascript/spec/helpers/httpBackend.js:9:375 
     src/main/webapp/bower_components/angular/angular.js:9:139615 
     [email protected]/main/webapp/bower_components/angular/angular.js:9:7090 
     [email protected]/main/webapp/bower_components/angular/angular.js:9:136826 
     [email protected]/main/webapp/bower_components/angular/angular.js:9:132232 
     [email protected]/main/webapp/bower_components/angular-mocks/angular-mocks.js:9:157942 
     [email protected]/main/webapp/bower_components/angular-mocks/angular-mocks.js:9:156451 
     [email protected]/test/javascript/spec/helpers/httpBackend.js:9:644 
     src/main/webapp/bower_components/angular/angular.js:9:139615 
     [email protected]/main/webapp/bower_components/angular/angular.js:9:7090 
     [email protected]/main/webapp/bower_components/angular/angular.js:9:136826 
     [email protected]/main/webapp/bower_components/angular/angular.js:9:132232 
     [email protected]/main/webapp/bower_components/angular-mocks/angular-mocks.js:9:157942 
     Error: <spyOn> : could not find an object to spy upon for logout() 
     Usage: spyOn(<object>, <methodName>) in node_modules/jasmine-core/lib/jasmine-core/jasmine.js (line 9) 
     src/test/javascript/spec/app/services/auth/auth.services.spec.js:9:2046 
     TypeError: undefined is not an object (evaluating '$httpBackend.verifyNoOutstandingExpectation') in src/test/javascript/spec/app/services/auth/auth.services.spec.js (line 9) 
     src/test/javascript/spec/app/services/auth/auth.services.spec.js:9:1725 
PhantomJS 2.1.1 (Mac OS X 0.0.0): Executed 43 of 43 (43 FAILED) (0 secs/0.732 secs) 
PhantomJS 2.1.1 (Mac OS X 0.0.0): Executed 43 of 43 (43 FAILED) ERROR (1.725 secs/0.732 secs) 
ESC[1AESC[2KPhantomJS 2.1.1 (Mac OS X 0.0.0): Executed 43 of 43 (43 FAILED) ERROR (1.725 secs/0.732 secs) 
[20:05:29] 'test' errored after 7.75 s 
[20:05:29] Error: 1 
    at formatError (/usr/local/lib/node_modules/gulp/bin/gulp.js:169:10) 
    at Gulp.<anonymous> (/usr/local/lib/node_modules/gulp/bin/gulp.js:195:15) 
    at emitOne (events.js:96:13) 
    at Gulp.emit (events.js:188:7) 
    at Gulp.Orchestrator._emitTaskDone (/Users/eric/Documents/devel/test/demo/jhipster-sample-app-master/node_modules/orchestrator/index.js:264:8) 
    at /Users/eric/Documents/devel/test/demo/jhipster-sample-app-master/node_modules/orchestrator/index.js:275:23 
    at finish (/Users/eric/Documents/devel/test/demo/jhipster-sample-app-master/node_modules/orchestrator/lib/runTask.js:21:8) 
    at cb (/Users/eric/Documents/devel/test/demo/jhipster-sample-app-master/node_modules/orchestrator/lib/runTask.js:29:3) 
    at removeAllListeners (/Users/eric/Documents/devel/test/demo/jhipster-sample-app-master/node_modules/karma/lib/server.js:379:7) 
    at Server.<anonymous> (/Users/eric/Documents/devel/test/demo/jhipster-sample-app-master/node_modules/karma/lib/server.js:390:9) 
    at Server.g (events.js:291:16) 
    at emitNone (events.js:91:20) 
    at Server.emit (events.js:185:7) 
    at emitCloseNT (net.js:1555:8) 
    at _combinedTickCallback (internal/process/next_tick.js:71:11) 
    at process._tickCallback (internal/process/next_tick.js:98:9) 

問題が何であるか任意のアイデア? 私はノードv6.9.5を使用しています。 npmは3.10.10、ガルプは3.9.1

ご協力ありがとうございます!

+0

意味しますか?初心者にとっては、作業環境を持っているかどうかチェックし、クローニングでは何もチェックしないので、Generationは正しい方法です。 –

答えて

2

bower_componentsに問題があります。生成中にbower_componentsがインストールされているため、これらのエラーはアプリケーションの生成時には表示されません。サンプルアプリから首尾よくテストを実行するために

:あなたは、サンプルアプリをクローン化されたか、「よjhipster」を使用してそれを生成し

git clone [email protected]:jhipster/jhipster-sample-app.git 
cd jhipster-sample-app 
npm install 

rm -r src/main/webapp/bower_components 
bower install 

gulp install 
gulp test 
+0

それは働いた!ご協力いただきありがとうございます! – Eric

関連する問題