我有一个相当简单的 karma.config.js 文件
basePath = '../';
files = [
JASMINE,
JASMINE_ADAPTER,
'js/lib/angular*.js',
'test/lib/angular/angular-mocks.js',
'js/**/*.js',
'test/unit/**/*.js'
];
autoWatch = true;
browsers = ['PhantomJS'];
当我运行时karma start config/karma.conf.js --single-run
,我得到以下输出
$ karma start config/karma.conf.js --single-run
[2013-06-24 23:47:08.750] [DEBUG] config - autoWatch set to false, because of singleRun
INFO [karma]: Karma server started at http://localhost:9876/
INFO [launcher]: Starting browser PhantomJS
INFO [PhantomJS 1.9 (Mac)]: Connected on socket id LwMoWxzIbSUuBsvIqB_m
PhantomJS 1.9 (Mac): Executed 6 of 6 SUCCESS (0.073 secs / 0.02 secs)
我一直在寻找一些东西来告诉我如何获取记录的测试的输出(例如SUCCESS Unit: services myService should behave
)
我可以看到测试输出的唯一方法是打开 Chrome 并单击“调试”,然后显示开发人员工具控制台。我希望将消息注销到终端,但我不知道如何让它工作。