簡體   English   中英

angularjs教程:測試錯誤,沒有更多信息

[英]angularjs tutorial: test ERROR, no more info

這是我第一次使用Angular(和Karma),所以請原諒我這是一個初學者的問題:這就是我的意思。

我正在嘗試運行Angular-phonecat測試,如步驟02 - 編寫和運行測試中所述

我的代碼直接從第2步分支git checkout -f step-2git checkout -f step-2

運行測試( angular-phonecat\\scripts> test )時,我收到以下消息:

INFO [karma]: Karma v0.10.2 server started at http://localhost:9876/
INFO [launcher]: Starting browser Chrome
INFO [Chrome 30.0.1599 (Windows 7)]: Connected on socket Jw-2z-zZ-pytGNN-SHRM
Chrome 30.0.1599 (Windows 7): Executed 0 of 0 ERROR (0.472 secs / 0 secs)

沒有給出更多的信息,我找不到任何可以詳細說明問題的日志(/ test或其子目錄中沒有任何內容,也沒有在/ logs中)。 我也找不到一般的業力日志 - 有一個嗎?

您需要將此行添加到karma.conf.js

exclude: ['app/lib/angular/angular-scenario.js'],

這里有一個與此問題有關的問題: https//github.com/angular/angular-phonecat/issues/71

嗨,我今天開始使用角度和業力,我在Mac上,我有同樣的問題。 我加入了freenode的IRC頻道#angularjs,並尋求一些幫助,這就是我得到的答案。

[16:59] <Wirde> Hi, I just started with the Angular-phonecat tutorial, after installing karma and the adapters I got too step 2 but when I try to run the unit tests it gives me the error: Executed 0 of 0 ERROR (0.327 secs / 0 secs). Can some please tell me whats wrong?
[17:00] <dmco> Wirde: I think phonecat is wonky after some 1.2rcX upgrades
[17:01] <dmco> Wirde: Another guy was complaining about issues with it yesterday
[17:02] <Wirde> dmco: hi, thanks for the answer, how do you suggest i proceed? Is there another good way to learn about karma and testing with angular?
[17:02] <rdepena> http://www.yearofmoo.com/2013/01/full-spectrum-testing-with-angularjs-and-karma.html#karma
[17:02] <dmco> Wirde: One easy way would be to scaffold a new project using Yeoman and the AngularJS generator
[17:02] <rdepena> this is a great source
[17:02] <dmco> ^^ Wirde that is a good link too
[17:03] <Wirde> dmco: rdepena: Thank you for the help! I will check it out :D

不確定這是你想要的響應還是它的應用但是我應該分享它。

暫無
暫無

聲明:本站的技術帖子網頁,遵循CC BY-SA 4.0協議,如果您需要轉載,請注明本站網址或者原文地址。任何問題請咨詢:yoyou2525@163.com.

 
粵ICP備18138465號  © 2020-2024 STACKOOM.COM