Skip to content
This repository has been archived by the owner on Jun 3, 2024. It is now read-only.

Commit

Permalink
include tests in eslinting
Browse files Browse the repository at this point in the history
  • Loading branch information
alexcjohnson committed Jan 24, 2019
1 parent 7d82256 commit 948c7dc
Show file tree
Hide file tree
Showing 3 changed files with 20 additions and 3 deletions.
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@
"prepare": "npm run build:all",
"publish-all": "node scripts/publish.js",
"start": "webpack-serve ./webpack.serve.config.js --open",
"lint": "eslint src",
"lint": "eslint src test",
"lint:py": "flake8 --ignore=E501,F401,F841,F811 test",
"test": "run-s -c test-unit test:py test:pyimport lint format:test lint:py",
"test:py": "python -m unittest test.test_integration",
Expand Down
19 changes: 18 additions & 1 deletion test/unit/Interval.test.js
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
import Interval from '../../src/components/Interval.react.js';
import React, {cloneElement, Component} from 'react';
import PropTypes from 'prop-types';
import omit from 'lodash/omit';
import {mount, render} from 'enzyme';

Expand Down Expand Up @@ -40,6 +41,11 @@ class IntervalWrapper extends Component {
}
}

IntervalWrapper.propTypes = {
children: PropTypes.node,
setProps: PropTypes.func
};

const intervalLength = 50;

// The following number should be large enough for any
Expand Down Expand Up @@ -127,11 +133,16 @@ describe('Delayed setProps provisioning', () => {
...omit(this.props, ['children']),
setProps: this.state.setPropsProvided
? this.props.setProps
: undefined,
: null,
});
}
}

DelayedSetPropsWrapper.propTypes = {
children: PropTypes.node,
setProps: PropTypes.func
};

const makeSut = () => {
const results = {
nIntervals: 0,
Expand Down Expand Up @@ -222,6 +233,12 @@ describe('Usage of disabled = true', () => {
}
}

DisabledTestingIntervalWrapper.propTypes = {
children: PropTypes.node,
setProps: PropTypes.func,
handleInterval: PropTypes.func
};

const makeSut = handleInterval => {
const results = {
nIntervals: 0,
Expand Down
2 changes: 1 addition & 1 deletion test/unit/Tabs.test.js
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
import Tabs from '../../src/components/Tabs.react.js';
import Tab from '../../src/components/Tab.react.js';
import React from 'react';
import {mount, shallow, render} from 'enzyme';
import {mount, render} from 'enzyme';

test('Tabs render', () => {
const tabs = render(
Expand Down

0 comments on commit 948c7dc

Please sign in to comment.