Skip to content

Commit 0d00456

Browse files
authored
Merge pull request #807 from plotly/verbose-reporting-notes
Additional notes on verbose karma reporting
2 parents 53d054e + 14e11eb commit 0d00456

File tree

3 files changed

+19
-1
lines changed

3 files changed

+19
-1
lines changed

CONTRIBUTING.md

+7-1
Original file line numberDiff line numberDiff line change
@@ -122,7 +122,13 @@ To run a specific suite, use:
122122
npm run test-jasmine -- tests/<suite>.js
123123
```
124124

125-
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).
125+
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:
126+
127+
```
128+
npm install karma-verbose-reporter
129+
```
130+
131+
and adding `reporters: ['verbose']` to the corresponding karma configuration file. (You should disable the `progress` reporter when using `verbose`.)
126132

127133

128134
Image pixel comparison tests are run in a docker container. For more

test/jasmine/karma.ciconf.js

+5
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,11 @@ function func(config) {
66
// possible values: config.LOG_DISABLE || config.LOG_ERROR || config.LOG_WARN || config.LOG_INFO || config.LOG_DEBUG
77
func.defaultConfig.logLevel = config.LOG_INFO;
88

9+
// Note: config.LOG_DEBUG may not be verbose enough to pin down the source of failed tests.
10+
// See the note in CONTRIBUTING.md about karma-verbose-reporter:
11+
// func.defaultConfig.reporters = ['verbose'];
12+
13+
914
// Continuous Integration mode
1015

1116
/*

test/jasmine/karma.conf.js

+7
Original file line numberDiff line numberDiff line change
@@ -26,6 +26,9 @@ function func(config) {
2626

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

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

6168
// web server port

0 commit comments

Comments
 (0)