Custom Jasmine reporter in Protractor tests

后端 未结 4 1571
旧时难觅i
旧时难觅i 2021-01-04 00:40

I can not find how to change reporter style in protractors runner using jasmine framework.

What I have right now is:

4条回答
  •  梦毁少年i
    2021-01-04 01:25

    Add this dependency to your project:
    npm install jasmine-spec-reporter --save-dev

    And add this to your config file:

    onPrepare: function(){
        var SpecReporter = require('jasmine-spec-reporter').SpecReporter;
        jasmine.getEnv().addReporter(new SpecReporter({displayStacktrace: 'all'}));
    }
    

提交回复
热议问题