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

Commit 948c7dc

Browse files
committed
include tests in eslinting
1 parent 7d82256 commit 948c7dc

File tree

3 files changed

+20
-3
lines changed

3 files changed

+20
-3
lines changed

Diff for: package.json

+1-1
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@
1212
"prepare": "npm run build:all",
1313
"publish-all": "node scripts/publish.js",
1414
"start": "webpack-serve ./webpack.serve.config.js --open",
15-
"lint": "eslint src",
15+
"lint": "eslint src test",
1616
"lint:py": "flake8 --ignore=E501,F401,F841,F811 test",
1717
"test": "run-s -c test-unit test:py test:pyimport lint format:test lint:py",
1818
"test:py": "python -m unittest test.test_integration",

Diff for: test/unit/Interval.test.js

+18-1
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,6 @@
11
import Interval from '../../src/components/Interval.react.js';
22
import React, {cloneElement, Component} from 'react';
3+
import PropTypes from 'prop-types';
34
import omit from 'lodash/omit';
45
import {mount, render} from 'enzyme';
56

@@ -40,6 +41,11 @@ class IntervalWrapper extends Component {
4041
}
4142
}
4243

44+
IntervalWrapper.propTypes = {
45+
children: PropTypes.node,
46+
setProps: PropTypes.func
47+
};
48+
4349
const intervalLength = 50;
4450

4551
// The following number should be large enough for any
@@ -127,11 +133,16 @@ describe('Delayed setProps provisioning', () => {
127133
...omit(this.props, ['children']),
128134
setProps: this.state.setPropsProvided
129135
? this.props.setProps
130-
: undefined,
136+
: null,
131137
});
132138
}
133139
}
134140

141+
DelayedSetPropsWrapper.propTypes = {
142+
children: PropTypes.node,
143+
setProps: PropTypes.func
144+
};
145+
135146
const makeSut = () => {
136147
const results = {
137148
nIntervals: 0,
@@ -222,6 +233,12 @@ describe('Usage of disabled = true', () => {
222233
}
223234
}
224235

236+
DisabledTestingIntervalWrapper.propTypes = {
237+
children: PropTypes.node,
238+
setProps: PropTypes.func,
239+
handleInterval: PropTypes.func
240+
};
241+
225242
const makeSut = handleInterval => {
226243
const results = {
227244
nIntervals: 0,

Diff for: test/unit/Tabs.test.js

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
import Tabs from '../../src/components/Tabs.react.js';
22
import Tab from '../../src/components/Tab.react.js';
33
import React from 'react';
4-
import {mount, shallow, render} from 'enzyme';
4+
import {mount, render} from 'enzyme';
55

66
test('Tabs render', () => {
77
const tabs = render(

0 commit comments

Comments
 (0)