-
Notifications
You must be signed in to change notification settings - Fork 4.3k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
make component unit test for component/panel/row.js
- Loading branch information
1 parent
429fb42
commit 7f518a4
Showing
1 changed file
with
24 additions
and
0 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,24 @@ | ||
/** | ||
* External dependencies | ||
*/ | ||
import { shallow } from 'enzyme'; | ||
|
||
/** | ||
* Internal dependencies | ||
*/ | ||
import PanelRow from '../row'; | ||
|
||
describe( 'PanelRow', () => { | ||
it( 'should defined default class name', () => { | ||
const wrapper = shallow( <PanelRow /> ); | ||
expect( wrapper.hasClass( 'components-panel__row' ) ).toBe( true ); | ||
} ); | ||
it( 'should defined custom class name', () => { | ||
const wrapper = shallow( <PanelRow className="custom" /> ); | ||
expect( wrapper.hasClass( 'custom' ) ).toBe( true ); | ||
} ); | ||
it( 'should return child components', () => { | ||
const wrapper = shallow( <PanelRow><p>children</p></PanelRow> ); | ||
expect( wrapper.find( 'p' ).text() ).toBe( 'children' ); | ||
} ); | ||
} ); |