Skip to content

Commit

Permalink
test(typings): restore assertion for typings and propTypes order (#2158)
Browse files Browse the repository at this point in the history
  • Loading branch information
layershifter authored and levithomason committed Oct 10, 2017
1 parent 9904616 commit 701f178
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion test/specs/commonTests/hasValidTypings.js
Original file line number Diff line number Diff line change
Expand Up @@ -75,11 +75,15 @@ export default (Component, extractedInfo, options = {}) => {
const componentProps = _.keys(componentPropTypes)
const interfaceProps = _.without(_.map(props, 'name'), ...ignoredTypingsProps)

componentProps.forEach((propName) => {
componentProps.forEach((propName, index) => {
interfaceProps.should.include(
propName,
`propTypes define "${propName}" but it is missing in typings`,
)
interfaceProps[index].should.equal(
propName,
`propTypes define "${propName}" but its order doesn't match typings`,
)
})

interfaceProps.forEach((propName) => {
Expand Down

0 comments on commit 701f178

Please sign in to comment.