Skip to content

Commit

Permalink
[test] Reduce the noise when running the test suite
Browse files Browse the repository at this point in the history
  • Loading branch information
oliviertassinari committed Aug 15, 2016
1 parent ccff9c6 commit ea2538e
Show file tree
Hide file tree
Showing 5 changed files with 9 additions and 14 deletions.
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@
"build:babel": "NODE_ENV=release babel ./src --ignore *.spec.js --out-dir ./build",
"build:copy-files": "babel-node ./scripts/copy-files.js",
"clean:build": "rimraf build",
"lint": "eslint src docs/src test/integration && echo \"eslint: no lint errors\"",
"lint": "eslint src docs/src test --quiet && echo \"eslint: no lint errors\"",
"lint:find-rules": "eslint-find-rules -u .eslintrc.js",
"prebuild": "npm run clean:build",
"test": "cross-env NODE_ENV=test babel-node test/index.js",
Expand Down
7 changes: 0 additions & 7 deletions src/Stepper/StepContent.spec.js
Original file line number Diff line number Diff line change
Expand Up @@ -24,13 +24,6 @@ describe('<StepContent />', () => {
assert.ok(wrapper.is('div'));
});

it('renders null when used in a horizontal stepper', () => {
const wrapper = shallowWithContext(
<StepContent />
, {stepper: {orientation: 'horizontal'}});
assert.strictEqual(wrapper.node, null);
});

it('merges styles and other props into the root node', () => {
const wrapper = shallowWithContext(
<StepContent
Expand Down
9 changes: 5 additions & 4 deletions src/TextField/TextField.spec.js
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,7 @@ describe('<TextField />', () => {
assert.strictEqual(value, 'woof', 'should pass the value as the 2nd arg');
done();
}}
id="unique"
/>
);

Expand Down Expand Up @@ -63,10 +64,10 @@ describe('<TextField />', () => {
assert.strictEqual(wrapper.find(TextFieldLabel).props().shrink, false, 'should not shrink TextFieldLabel');
});

describe('props: children', () => {
describe('prop: children', () => {
it('should forward any property to the root', () => {
const wrapper = shallowWithContext(
<TextField data-test="hello">
<TextField data-test="hello" id="unique">
<div />
</TextField>
);
Expand All @@ -88,7 +89,7 @@ describe('<TextField />', () => {

values.forEach((value) => {
const wrapper = shallowWithContext(
<TextField id="isValid" value={value} />
<TextField value={value} id="unique" />
);

assert.strictEqual(wrapper.state().hasValue, false,
Expand All @@ -105,7 +106,7 @@ describe('<TextField />', () => {

values.forEach((value) => {
const wrapper = shallowWithContext(
<TextField id="isValid" value={value} />
<TextField value={value} id="unique" />
);

assert.strictEqual(wrapper.state().hasValue, true,
Expand Down
1 change: 1 addition & 0 deletions test/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,7 @@ if (types.indexOf('unit') + types.indexOf('integration') === -2) {

const mocha = new Mocha({
grep: argv.grep ? argv.grep : undefined,
reporter: 'dot',
});

Glob(
Expand Down
4 changes: 2 additions & 2 deletions test/karma.conf.js
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,7 @@ module.exports = function(config) {
preprocessors: {
'test/karma.tests.js': ['webpack', 'sourcemap'],
},
reporters: ['mocha'],
reporters: ['dots'],
singleRun: false,
webpack: {
devtool: 'inline-source-map',
Expand Down Expand Up @@ -90,6 +90,6 @@ module.exports = function(config) {
},
webpackServer: {
noInfo: true,
}
},
});
};

0 comments on commit ea2538e

Please sign in to comment.