UNPKG

react-spatial

Version:

Components to build React map apps.

25 lines (22 loc) 796 B
import React from 'react'; import renderer from 'react-test-renderer'; import { configure } from 'enzyme'; import Adapter from 'enzyme-adapter-react-16'; import Tabs from './Tabs'; import Tab from '../Tab'; configure({ adapter: new Adapter() }); describe('Tabs', function () { describe('should match snapshot.', function () { test('with two tabs.', function () { var component = renderer.create( React.createElement( Tabs, null, React.createElement( Tab, { title: "Tab 1", onClick: function () {} }, "Tab 1"), React.createElement( Tab, { active: true, title: "Tab 2", onClick: function () {} }, "Tab 2") ) ); var tree = component.toJSON(); expect(tree).toMatchSnapshot(); }); }); }); //# sourceMappingURL=Tabs.test.js.map