mirror of
https://github.com/apache/superset.git
synced 2026-04-12 04:37:49 +00:00
Bumping the JS libs to fix the build (#2616)
* 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
This commit is contained in:
committed by
GitHub
parent
a2b30f35fc
commit
366ecefbaa
@@ -0,0 +1,34 @@
|
||||
import React from 'react';
|
||||
import { expect } from 'chai';
|
||||
import { describe, it, beforeEach } from 'mocha';
|
||||
import { shallow } from 'enzyme';
|
||||
|
||||
import RunQueryActionButton
|
||||
from '../../../../javascripts/SqlLab/components/RunQueryActionButton';
|
||||
import Button from '../../../../javascripts/components/Button';
|
||||
|
||||
describe('RunQueryActionButton', () => {
|
||||
let wrapper;
|
||||
const defaultProps = {
|
||||
allowAsync: false,
|
||||
dbId: 1,
|
||||
queryState: 'pending',
|
||||
runQuery: () => {}, // eslint-disable-line
|
||||
selectedText: null,
|
||||
stopQuery: () => {}, // eslint-disable-line
|
||||
};
|
||||
|
||||
beforeEach(() => {
|
||||
wrapper = shallow(<RunQueryActionButton {...defaultProps} />);
|
||||
});
|
||||
|
||||
it('is a valid react element', () => {
|
||||
expect(
|
||||
React.isValidElement(<RunQueryActionButton {...defaultProps} />),
|
||||
).to.equal(true);
|
||||
});
|
||||
|
||||
it('renders a single Button', () => {
|
||||
expect(wrapper.find(Button)).to.have.lengthOf(1);
|
||||
});
|
||||
});
|
||||
Reference in New Issue
Block a user