hop
hop

Reputation: 261

Verbose output in jest js

is any option for verbore output for testing by jest?

I can see which modules are mocked.

I tried

jasmine.VERBOSE = true;

but not working.

Thanks for answer.

Upvotes: 26

Views: 38682

Answers (3)

Pinqode
Pinqode

Reputation: 101

Create jest.config.js file in root directory and add this to the module export

module.exports = {
    // some code here..
    verbose: true,
    // some code here...
}

Upvotes: 0

Denis Rudov
Denis Rudov

Reputation: 863

simple add in package.json

{
...
...

 "jest": {
         "verbose": true
 },
...
...
}

Upvotes: 11

Jonathan Huang
Jonathan Huang

Reputation: 2086

To get verbose mode in Jest, you can run Jest with the --verbose tag.

In your packages.json, you can write:

"scripts": {
  "test": "jest --verbose"
 },

Then you can run npm test

Alternatively, if you are using gulp-jest, to get Jest in verbose mode, find the index.js file of the gulp-jest folder in node_modules and add a verbose: true to the jest.runCLI block.

jest.runCLI({
  config: options,
  verbose: true
}

Upvotes: 51

Related Questions