mirror of
https://github.com/apache/superset.git
synced 2026-04-09 11:25:23 +00:00
* [lint] turn no-undef back on, set browser, cypress, and mocha env's, and fix issues * [lint] fix undefined var in TimeTable.jsx
26 lines
609 B
JavaScript
26 lines
609 B
JavaScript
import React from 'react';
|
|
import { expect } from 'chai';
|
|
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);
|
|
});
|
|
});
|