Merge pull request #1763 from influxdata/test/add_detailed_reporting

Add option for verbose reporting in client unit tests
pull/10616/head
Jared Scheib 2017-07-24 13:04:04 -07:00 committed by GitHub
commit f130072309
4 changed files with 21 additions and 8 deletions

View File

@ -15,7 +15,7 @@ yarn add --dev packageName
```
### Updating a package
First, run
First, run
```sh
yarn outdated
@ -31,3 +31,6 @@ To upgrade a single package named `packageName`:
```sh
yarn upgrade packageName
```
## Testing
Tests can be run via command line with `npm test`, from within the `/ui` directory. For more detailed reporting, use `npm test -- --reporters=verbose`.

View File

@ -1,5 +1,5 @@
var webpack = require('webpack');
var path = require('path');
var webpack = require('webpack')
var path = require('path')
module.exports = function(config) {
config.set({
@ -15,6 +15,8 @@ module.exports = function(config) {
'spec/spec-helper.js': ['webpack', 'sourcemap'],
'spec/index.js': ['webpack', 'sourcemap'],
},
// For more detailed reporting on tests, you can add 'verbose' and/or 'progress'.
// This can also be done via the command line with `npm test -- --reporters=verbose`.
reporters: ['dots'],
webpack: {
devtool: 'inline-source-map',
@ -35,7 +37,8 @@ module.exports = function(config) {
exclude: /node_modules/,
loader: 'style-loader!css-loader!sass-loader',
},
{ // Sinon behaves weirdly with webpack, see https://github.com/webpack/webpack/issues/304
{
// Sinon behaves weirdly with webpack, see https://github.com/webpack/webpack/issues/304
test: /sinon\/pkg\/sinon\.js/,
loader: 'imports?define=>false,require=>false',
},
@ -48,7 +51,7 @@ module.exports = function(config) {
externals: {
'react/addons': true,
'react/lib/ExecutionEnvironment': true,
'react/lib/ReactContext': true
'react/lib/ReactContext': true,
},
resolve: {
alias: {
@ -65,5 +68,5 @@ module.exports = function(config) {
webpackServer: {
noInfo: true, // please don't spam the console when running in karma!
},
});
};
})
}

View File

@ -68,6 +68,7 @@
"karma-phantomjs-launcher": "^1.0.2",
"karma-sinon-chai": "^1.2.4",
"karma-sourcemap-loader": "^0.3.7",
"karma-verbose-reporter": "^0.0.6",
"karma-webpack": "^1.8.0",
"mocha": "^2.4.5",
"mocha-loader": "^0.7.1",

View File

@ -1808,7 +1808,7 @@ colors@1.0.3:
version "1.0.3"
resolved "https://registry.yarnpkg.com/colors/-/colors-1.0.3.tgz#0433f44d809680fdeb60ed260f1b0c262e82a40b"
colors@^1.1.0, colors@~1.1.2:
colors@>=1.0, colors@^1.1.0, colors@~1.1.2:
version "1.1.2"
resolved "https://registry.yarnpkg.com/colors/-/colors-1.1.2.tgz#168a4701756b6a7f51a12ce0c97bfa28c084ed63"
@ -4092,6 +4092,12 @@ karma-sourcemap-loader@^0.3.7:
dependencies:
graceful-fs "^4.1.2"
karma-verbose-reporter@^0.0.6:
version "0.0.6"
resolved "https://registry.yarnpkg.com/karma-verbose-reporter/-/karma-verbose-reporter-0.0.6.tgz#5909052451c607f02ac77c763791a2fe1251260c"
dependencies:
colors ">=1.0"
karma-webpack@^1.8.0:
version "1.8.1"
resolved "https://registry.yarnpkg.com/karma-webpack/-/karma-webpack-1.8.1.tgz#39d5fd2edeea3cc3ef5b405989b37d5b0e6a3b4e"