wix-storybook-utils
Version:
Utilities for automated component documentation within Storybook
22 lines • 823 B
JavaScript
import { extractTabs } from './extract-tabs';
import * as Section from './';
describe('extractTabs()', function () {
it('should extract tab names from TabSection and return array', function () {
var expectedTabs = ['first tab', 'second tab'];
var section = Section.tab({
title: 'root, ignored',
sections: [
Section.tab({
title: expectedTabs[0],
sections: [Section.code({ source: '"hello";' })],
}),
Section.tab({
title: expectedTabs[1],
sections: [Section.code({ source: '"hello";' })],
}),
],
});
expect(extractTabs(section)).toEqual(expectedTabs);
});
});
//# sourceMappingURL=extract-tabs.test.js.map