mirror of
https://github.com/apache/superset.git
synced 2026-04-09 19:35:21 +00:00
27 lines
647 B
JavaScript
27 lines
647 B
JavaScript
import React from 'react';
|
|
import { expect } from 'chai';
|
|
import { describe, it } from 'mocha';
|
|
import { shallow } from 'enzyme';
|
|
import { Label } from 'react-bootstrap';
|
|
|
|
import CachedLabel from '../../../src/components/CachedLabel';
|
|
|
|
describe('CachedLabel', () => {
|
|
const defaultProps = {
|
|
onClick: () => {},
|
|
cachedTimestamp: '2017-01-01',
|
|
};
|
|
|
|
it('is valid', () => {
|
|
expect(
|
|
React.isValidElement(<CachedLabel {...defaultProps} />),
|
|
).to.equal(true);
|
|
});
|
|
it('renders', () => {
|
|
const wrapper = shallow(
|
|
<CachedLabel {...defaultProps} />,
|
|
);
|
|
expect(wrapper.find(Label)).to.have.length(1);
|
|
});
|
|
});
|