Skip to content

Commit

Permalink
Add basic Spinner component tests.
Browse files Browse the repository at this point in the history
Adds basic Spinner component tests. Related to progress on #641.
Testing Instructions
Run npm i && npm run test-unit ensure tests pass. Change component logic
to ensure tests fail as they should.
  • Loading branch information
BE-Webdesign committed May 30, 2017
1 parent ccf8728 commit effef54
Showing 1 changed file with 20 additions and 0 deletions.
20 changes: 20 additions & 0 deletions components/spinner/test/index.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
/**
* External dependencies
*/
import { expect } from 'chai';
import { shallow } from 'enzyme';

/**
* Internal dependencies
*/
import Spinner from '../';

describe( 'Spinner', () => {
describe( 'basic rendering', () => {
it( 'should match the following element', () => {
const element = <span className="spinner is-active" />;
const spinner = shallow( <Spinner /> );
expect( spinner.matchesElement( element ) ).to.be.true();
} );
} );
} );

0 comments on commit effef54

Please sign in to comment.