Skip to content

Commit

Permalink
JetpackLogo component unit tests.
Browse files Browse the repository at this point in the history
  • Loading branch information
sergeymitr committed Jun 24, 2021
1 parent 51c7fc2 commit b55ed90
Showing 1 changed file with 33 additions and 0 deletions.
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 );
} );
} );
} );

0 comments on commit b55ed90

Please sign in to comment.