mirror of
https://github.com/apache/superset.git
synced 2026-04-15 06:04:48 +00:00
* bumping the js libs * New linting rules * More linting * More * Done linting * npm >=4.5.0 * Bumping node * Tweaking the build * Fixing the damn build * Fixing the apps
29 lines
752 B
JavaScript
29 lines
752 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('renders', () => {
|
|
expect(React.isValidElement(<Timer />)).to.equal(true);
|
|
});
|
|
it('renders with props', () => {
|
|
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);
|
|
});
|
|
});
|