mirror of
https://github.com/apache/superset.git
synced 2026-04-09 11:25:23 +00:00
* [lint] turn no-undef back on, set browser, cypress, and mocha env's, and fix issues * [lint] fix undefined var in TimeTable.jsx
19 lines
548 B
JavaScript
19 lines
548 B
JavaScript
import React from 'react';
|
|
import { mount } from 'enzyme';
|
|
import { expect } from 'chai';
|
|
|
|
import CodeModal from '../../../../src/dashboard/components/CodeModal';
|
|
|
|
describe('CodeModal', () => {
|
|
const mockedProps = {
|
|
triggerNode: <i className="fa fa-edit" />,
|
|
};
|
|
it('is valid', () => {
|
|
expect(React.isValidElement(<CodeModal {...mockedProps} />)).to.equal(true);
|
|
});
|
|
it('renders the trigger node', () => {
|
|
const wrapper = mount(<CodeModal {...mockedProps} />);
|
|
expect(wrapper.find('.fa-edit')).to.have.length(1);
|
|
});
|
|
});
|