Skip to content

Additional notes on verbose karma reporting #807

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
Aug 2, 2016
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 7 additions & 1 deletion CONTRIBUTING.md
Original file line number Diff line number Diff line change
Expand Up @@ -122,7 +122,13 @@ To run a specific suite, use:
npm run test-jasmine -- tests/<suite>.js
```

where the `<suite>` corresponds to the suite's file name as found in [`test/jasmine/tests/`](https://github.com/plotly/plotly.js/tree/master/test/jasmine/tests).
where the `<suite>` corresponds to the suite's file name as found in [`test/jasmine/tests/`](https://github.com/plotly/plotly.js/tree/master/test/jasmine/tests). In certain situations, you may find that the default reporting is not verbose enough to pin down the source of the failing test. In this situation, you may wish to use [karma-verbose-reporter](https://www.npmjs.com/package/karma-verbose-reporter). You can use it without adding as a dev dependency by running:

```
npm install karma-verbose-reporter
```

and adding `reporters: ['verbose']` to the corresponding karma configuration file. (You should disable the `progress` reporter when using `verbose`.)


Image pixel comparison tests are run in a docker container. For more
Expand Down
5 changes: 5 additions & 0 deletions test/jasmine/karma.ciconf.js
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,11 @@ function func(config) {
// possible values: config.LOG_DISABLE || config.LOG_ERROR || config.LOG_WARN || config.LOG_INFO || config.LOG_DEBUG
func.defaultConfig.logLevel = config.LOG_INFO;

// Note: config.LOG_DEBUG may not be verbose enough to pin down the source of failed tests.
// See the note in CONTRIBUTING.md about karma-verbose-reporter:
// func.defaultConfig.reporters = ['verbose'];


// Continuous Integration mode

/*
Expand Down
7 changes: 7 additions & 0 deletions test/jasmine/karma.conf.js
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,9 @@ function func(config) {

// level of logging
// possible values: config.LOG_DISABLE || config.LOG_ERROR || config.LOG_WARN || config.LOG_INFO || config.LOG_DEBUG
//
// NB: if you try config.LOG_DEBUG, you may actually be looking for karma-verbose-reporter.
// See CONTRIBUTING.md for additional notes on reporting.
func.defaultConfig.logLevel = config.LOG_INFO;

config.set(func.defaultConfig);
Expand Down Expand Up @@ -56,6 +59,10 @@ func.defaultConfig = {
// test results reporter to use
// possible values: 'dots', 'progress'
// available reporters: https://npmjs.org/browse/keyword/karma-reporter
//
// See note in CONTRIBUTING.md about more verbose reporting via karma-verbose-reporter:
// https://www.npmjs.com/package/karma-verbose-reporter ('verbose')
//
reporters: ['progress'],

// web server port
Expand Down