-
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.
chore(Dropdown*): use React.forwardRef() (#4273)
* chore(Dropdown*): use React.forwardRef() * fix examples-test
- Loading branch information
1 parent
67dd227
commit ac81442
Showing
13 changed files
with
138 additions
and
112 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
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,16 +1,21 @@ | ||
import { createElement } from 'react' | ||
import * as React from 'react' | ||
|
||
const exampleContext = require.context('docs/src/examples', true, /\w+Example\w*\.js$/) | ||
let wrapper | ||
|
||
describe('examples', () => { | ||
afterEach(() => { | ||
wrapper.unmount() | ||
}) | ||
|
||
exampleContext.keys().forEach((path) => { | ||
const filename = path.replace(/^.*\/(\w+\.js)$/, '$1') | ||
|
||
it(`${filename} renders without console activity`, () => { | ||
// TODO also render the example's path in a <ComponentExample /> just as the docs do | ||
const wrapper = mount(createElement(exampleContext(path).default)) | ||
const Component = exampleContext(path).default | ||
|
||
wrapper.unmount() | ||
wrapper = mount(React.createElement(Component)) | ||
wrapper.should.not.be.blank() | ||
}) | ||
}) | ||
}) |
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.