-
Notifications
You must be signed in to change notification settings - Fork 799
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
51c7fc2
commit b55ed90
Showing
1 changed file
with
33 additions
and
0 deletions.
There are no files selected for viewing
33 changes: 33 additions & 0 deletions
33
projects/js-packages/components/components/jetpack-logo/test/component.jsx
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,33 @@ | ||
/** | ||
* External dependencies | ||
*/ | ||
import React from 'react'; | ||
import { expect } from 'chai'; | ||
import { shallow } from 'enzyme'; | ||
import ShallowRenderer from 'react-test-renderer/shallow'; | ||
|
||
/** | ||
* Internal dependencies | ||
*/ | ||
import JetpackLogo from '../index'; | ||
|
||
describe( 'JetpackLogo', () => { | ||
const testProps = { | ||
className: 'sample-classname', | ||
}; | ||
|
||
describe( 'Render the JetpackLogo component', () => { | ||
const renderer = new ShallowRenderer(); | ||
renderer.render( <JetpackLogo { ...testProps } /> ); | ||
|
||
const wrapper = shallow( renderer.getRenderOutput() ); | ||
|
||
it( 'component exists', () => { | ||
expect( wrapper.find( 'JetpackLogo' ) ).to.exist; | ||
} ); | ||
|
||
it( 'validate the class name', () => { | ||
expect( wrapper.hasClass( 'sample-classname' ) ).to.equal( true ); | ||
} ); | ||
} ); | ||
} ); |