Files
superset2/superset/assets/spec/javascripts/sqllab/Timer_spec.jsx
Denny Biasiolli 3cd16cf368 Fix test's warnings (#2697)
* tests: adding required props to FilterableTable mockedProps

* tests: adding required prop `height` to QuerySearch mockedProps

* tests: adding required prop `height` to ResultSet mockedProps

* tests: adding required prop `height` to SqlEditorLeftBar mockedProps

* tests: fix warning in Timer component
2017-04-30 10:58:09 -07:00

26 lines
652 B
JavaScript

import React from 'react';
import { shallow } from 'enzyme';
import { describe, it } from 'mocha';
import { expect } from 'chai';
import Timer from '../../../javascripts/components/Timer';
import { now } from '../../../javascripts/modules/dates';
describe('Timer', () => {
const mockedProps = {
startTime: now(),
endTime: null,
isRunning: true,
state: 'warning',
};
it('is valid', () => {
expect(React.isValidElement(<Timer {...mockedProps} />))
.to.equal(true);
});
it('renders a span', () => {
const wrapper = shallow(<Timer {...mockedProps} />);
expect(wrapper.find('span')).to.have.length(1);
});
});