业力配置以禁用无头镀铬并且仅使用终端 [英] karma configuration to disable headless chrome and use only terminal

查看:76
本文介绍了业力配置以禁用无头镀铬并且仅使用终端的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我正在尝试运行Angular单元测试.我想配置karma.config文件以不打开无头Chrome.我只是想仅在终端中查看输出.

I am trying to run Angular unit test. I want to configure karma.config file not to open headless chrome. Simply I want to see output in terminal alone.

我尝试在 karma.config ....

reporters: ['progress', 'kjhtml'],
    port: 9876,
    colors: true,
    logLevel: config.LOG_INFO,
    autoWatch: true,
    browsers: ['Chrome'],
    singleRun: false

reporters: ['progress', 'kjhtml'],
    port: 9876,
    colors: true,
    logLevel: config.LOG_INFO,
    autoWatch: true,
    browsers: ['Chrome'],
    singleRun: false

运行测试不应打开无头镀铬

running test should not open headless chrome

推荐答案

您当前未使用无头Chrome.由于您的设置具有[Chrome]

You are currently not using headless chrome. It is getting launched since your setting has [Chrome]

您需要更改browser数组值.

browsers: ['Chrome']更改为browsers: ['ChromeHeadless']

这篇关于业力配置以禁用无头镀铬并且仅使用终端的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆