-
Notifications
You must be signed in to change notification settings - Fork 4.1k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
c1a840d
commit fc6cee3
Showing
9 changed files
with
101 additions
and
79 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,19 +1,16 @@ | ||
import _ from 'lodash' | ||
import { getOriginalComponent } from 'test/utils' | ||
|
||
/** | ||
* Assert a component exposes other components as (static properties). | ||
* @param {React.Component|Function} RawComponent The Component. | ||
* @param {React.Component|Function} Component The Component. | ||
* @param {React.Component[]} subComponents Array of components that should exist on Component. | ||
*/ | ||
export default (RawComponent, subComponents) => { | ||
// const staticValues = _.values(getOriginalComponent(RawComponent)) | ||
export default (Component, subComponents) => { | ||
const staticValues = _.values(Component) | ||
|
||
// _.each(subComponents, (rawSubComponent) => { | ||
// const subComponent = getOriginalComponent(rawSubComponent) | ||
// | ||
// it(`has sub component ${subComponent._meta.name}`, () => { | ||
// staticValues.should.contain(rawSubComponent) | ||
// }) | ||
// }) | ||
_.each(subComponents, (subComponent) => { | ||
it(`has sub component ${subComponent._meta.name}`, () => { | ||
staticValues.should.contain(subComponent) | ||
}) | ||
}) | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.