2017-06-21 70 views
1

我正在使用Jasmine和Karma進行我的前端單元測試。當運行我的測試中,我得到了以下錯誤:Chrome 59.0.3071(Mac OS X 10.11.6)錯誤未獲取狀態的響應:404未找到URL

終端錯誤

Chrome 59.0.3071 (Mac OS X 10.11.6) ERROR Uncaught Response with status: 404 Not Found for URL: http://localhost:9876/api/volunteer at http://localhost:9876/_karma_webpack_/polyfills.bundle.js:2604 Chrome 59.0.3071 (Mac OS X 10.11.6): Executed 4 of 6 ERROR (0 secs/1.02 secs) Chrome 59.0.3071 (Mac OS X 10.11.6) ERROR Uncaught Response with status: 404 Not Found for URL: http://localhost:9876/api/volunteer Chrome 59.0.3071 (Mac OS X 10.11.6): Executed 4 of 6 ERROR (1.433 secs/1.02 secs)

瀏覽器錯誤

SignUpComponent should be created [object ErrorEvent] thrown SignUpComponent form should clear on submit [object ErrorEvent] thrown

我想不通,爲什麼終端告訴我,我有一個404錯誤,瀏覽器告訴我在sign-up.component.spec中有一個錯誤。 TS。 sign-up.component.spec.ts不會發出任何http請求。

SignUpComponent可以在客戶端/應用/簽上/登錄up.component.spec.ts在以下庫中找到: https://github.com/cerberus-org/cerberus-app

東西試圖調試的時候是,如果我註釋掉的客戶,我注意到/app/shared/volunteer.service.spec.ts即使錯誤指向client/app/sign-up/sign-up.component.spec.ts,所有測試都會通過。

任何洞見讚賞。

回答

相關問題