[build] Bump superset-ui packages and update build (#9241)

This commit is contained in:
Erik Ritter
2020-03-05 14:20:45 -08:00
committed by GitHub
parent 4ffee8c5d1
commit 786e575dbe
9 changed files with 1708 additions and 1777 deletions

View File

@@ -25,7 +25,6 @@ import { now } from '../../../src/modules/dates';
describe('Timer', () => {
let wrapper;
let clock;
const mockedProps = {
endTime: null,
isRunning: true,
@@ -33,21 +32,17 @@ describe('Timer', () => {
};
beforeEach(() => {
clock = sinon.useFakeTimers();
mockedProps.startTime = now() + 1;
wrapper = mount(<Timer {...mockedProps} />);
});
afterEach(() => {
clock.restore();
});
it('is a valid element', () => {
expect(React.isValidElement(<Timer {...mockedProps} />)).toBe(true);
});
it('componentWillMount starts timer after 30ms and sets state.clockStr', () => {
it('componentWillMount starts timer after 30ms and sets state.clockStr', async () => {
expect(wrapper.state().clockStr).toBe('');
clock.tick(31);
await new Promise(r => setTimeout(r, 35));
expect(wrapper.state().clockStr).not.toBe('');
});