0

我已经安装了 yoeman 并使用yo generator-angular. 当我运行时grunt test,它会突然打开和关闭 Google Chrome 浏览器,而我并没有保持打开状态,我无法在浏览器中查看测试日志。

以下是在命令提示符中生成的日志:

F:\ng>grunt test
Running "clean:server" (clean) task
Cleaning .tmp...OK

Running "concurrent:test" (concurrent) task

Running "compass:dist" (compass) task
directory .tmp/styles/
       create .tmp/styles/main.css (1.342s)
    Compilation took 1.411s

Running "compass:server" (compass) task
unchanged app/styles/main.scss
    Compilation took 0.232s

Done, without errors.

Running "autoprefixer:dist" (autoprefixer) task
File .tmp/styles/main.css created.

Running "connect:test" (connect) task
Started connect web server on http://localhost:9001

Running "karma:unit" (karma) task
INFO [karma]: Karma v0.12.17 server started at http://localhost:8080/
INFO [launcher]: Starting browser Chrome
WARN [watcher]: Pattern "F:/ng/test/mock/**/*.js" does not match any file.
INFO [Chrome 36.0.1985 (Windows 8.1)]: Connected on socket W7iPEP_K_IgMyK6WrKFt
with id 83112925
Chrome 36.0.1985 (Windows 8.1) Controller: MainCtrl should attach a list of awes
omeThings to the scope FAILED
        Expected 4 to be 3.
        Error: Expected 4 to be 3.
            at null.<anonymous> (F:/ng/test/spec/controllers/main.js:20:40)
Chrome 36.0.1985 (Windows 8.1): Executed 2 of 2 (1 FAILED) (0 secs / 0.053 secs)
Chrome 36.0.1985 (Windows 8.1): Executed 2 of 2 (1 FAILED) (0.067 secs / 0.053 s
ecs)
Warning: Task "karma:unit" failed. Use --force to continue.

Aborted due to warnings.


Execution Time (2014-07-20 12:08:40 UTC)
concurrent:test     7.1s  ■■■■■■■■■■■■■■■■■■■■■■■■ 56%
autoprefixer:dist  373ms  ■■ 3%
connect:test       441ms  ■■ 3%
karma:unit          4.9s  ■■■■■■■■■■■■■■■■■ 38%
Total 12.8s

请告知如何解决此问题。

谢谢

4

0 回答 0