[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

@@ -18,7 +18,6 @@
*/
import React from 'react';
import { shallow } from 'enzyme';
import sinon from 'sinon';
import AnchorLink from '../../../src/components/AnchorLink';
import URLShortLinkButton from '../../../src/components/URLShortLinkButton';
@@ -41,17 +40,16 @@ describe('AnchorLink', () => {
delete global.window.location.value;
});
it('should scroll the AnchorLink into view upon mount', () => {
const callback = sinon.spy();
const clock = sinon.useFakeTimers();
const stub = sinon.stub(document, 'getElementById').returns({
it('should scroll the AnchorLink into view upon mount', async () => {
const callback = jest.fn();
const stub = jest.spyOn(document, 'getElementById').mockReturnValue({
scrollIntoView: callback,
});
shallow(<AnchorLink {...props} />);
clock.tick(2000);
expect(callback.callCount).toEqual(1);
stub.restore();
await new Promise(r => setTimeout(r, 2000));
expect(stub).toHaveBeenCalledTimes(1);
});
it('should render anchor link with id', () => {