import React from 'react';
import { mount } from 'enzyme';
import { expect } from 'chai';
import { describe, it, specs } from '../../storybook/facade';
import Metadata from './index';

export default (stories) => {
	stories.add('Metadata', () => {
		const component = (
			<Metadata
				data={[
					{
						title: 'Contributors',
						value: (
							<>
								16
								<span>14 active during this period</span>
							</>
						)
					},
					{
						title: 'Cost',
						value: '$1.9m'
					},
				]}
			/>
		);

		specs(() => describe('Metadata', () => {
			const wrapper = mount(component);

			it('Should be ok', () => {
				expect(wrapper).be.ok;
			});
		}));

		return component;
	});
};
