How to suppress output for skipped tests in Jasmine

webduvet

If I have the scenario with 1000+ tests and want to run only selected portion of them I can use fdescribe.

The rest of tests are skipped which is great however they still pollute the console output. How can I suppress the console output for skipped tests?

Snekse

If you're running tests via Karma, there is a spec reporter plugin that you can configure to ignore various things.

https://www.npmjs.com/package/karma-spec-reporter

https://www.npmjs.com/package/karma-spec-reporter-2

Add the following to your karma.conf.js:

...
  config.set({
    ...
      reporters: ["spec"],
      specReporter: {
        suppressSkipped: true, // do not print information about skipped tests 
      },
      plugins: ["karma-spec-reporter"],
    ...

If you're not using Karma, then you need to find the proper Jasmine reporter and configure it, or create your own reporter.

https://www.npmjs.com/package/jasmine2-reporter

Collected from the Internet

Please contact [email protected] to delete if infringement.

edited at
0

Comments

0 comments
Login to comment

Related

From Dev

How to suppress output in RStudio?

From Dev

How to reuse Jasmine tests

From Dev

Output of tests in command line jasmine karma grunt

From Dev

How to suppress command output safely?

From Dev

How do I suppress this output?

From Dev

How to suppress the output of `DBCC SHRINKFILE`?

From Dev

How to suppress expect send output?

From Dev

How to suppress function output in python

From Dev

How to suppress function output in python

From Dev

How to suppress output of bash command

From Dev

How to run Jasmine tests in TeamCity

From Dev

How to run Jasmine tests in TeamCity

From Dev

How to suppress Spark logging in unit tests?

From Dev

How to suppress output to stderr in a clojure program

From Java

How do you suppress output in IPython Notebook?

From Java

How to suppress output when running npm scripts

From Dev

How can I suppress output of grep?

From Dev

How to suppress awk output when using FS?

From Dev

How to suppress output filename in FFMPEG video

From Dev

How to suppress mysql stored procedure output?

From Dev

How can I suppress NUnit console output?

From Dev

Java ProcessBuilder: How to suppress output instead of redirecting it

From Dev

cURL: how to suppress strange output when redirecting?

From Dev

How to suppress output filename in FFMPEG video

From Dev

How to suppress warning output in CruiseControl.net

From Dev

How to suppress messages output by ESAPI library

From Dev

How to suppress web.py output?

From Dev

How do you run Jasmine tests in the browser?

From Dev

How to inject controller dependencies in Jasmine tests?