Skip to content

Commit f9a1dc6

Browse files
committed
Add tests for main export
1 parent 8584b38 commit f9a1dc6

File tree

1 file changed

+10
-3
lines changed

1 file changed

+10
-3
lines changed

src/__tests__/main-test.js

Lines changed: 10 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,15 +1,22 @@
11
/* global describe, it, expect */
2-
import { Tab, Tabs, TabList, TabPanel } from '../main';
2+
import ReactTabs, { Tab, Tabs, TabList, TabPanel } from '../main';
33
import TabComponent from '../components/Tab';
44
import TabListComponent from '../components/TabList';
55
import TabsComponent from '../components/Tabs';
66
import TabPanelComponent from '../components/TabPanel';
77

8-
describe('<TabList />', () => {
9-
it('should correctly export all components', () => {
8+
describe('main.js', () => {
9+
it('should correctly export all component as named export', () => {
1010
expect(Tab).toEqual(TabComponent);
1111
expect(TabList).toEqual(TabListComponent);
1212
expect(Tabs).toEqual(TabsComponent);
1313
expect(TabPanel).toEqual(TabPanelComponent);
1414
});
15+
16+
it('should correctly export all components as legacy es6 export', () => {
17+
expect(ReactTabs.Tab).toEqual(TabComponent);
18+
expect(ReactTabs.TabList).toEqual(TabListComponent);
19+
expect(ReactTabs.Tabs).toEqual(TabsComponent);
20+
expect(ReactTabs.TabPanel).toEqual(TabPanelComponent);
21+
});
1522
});

0 commit comments

Comments
 (0)