Redirect calls to console.log() to standard output in Jasmine tests

后端 未结 8 1420
名媛妹妹
名媛妹妹 2021-02-02 05:00

I\'m using Jasmine via the jasmine-maven-plugin, and I would like to see console.log() messages in the Maven build output. Is there a way to achieve this?

If console.log

8条回答
  •  醉话见心
    2021-02-02 05:38

    1) Go to your project directory where you have your pom.xml. Run the following command in cmd. mvn jasmine:bdd

    2) You will get the localhost URL : localhost:8234 (just an example).

    3) Run this URL in the browser. Now all your test cases gets executed.

    4) Do the Inspect element of this page. In the browser console you will be able to see all the console.log() or console.error() traces.

提交回复
热议问题