Prettify the frontend code (#8648)

* Add Prettier global configs

* Format js/jsx/ts/tsx/less files
This commit is contained in:
Erik Ritter
2019-11-27 14:02:48 -08:00
committed by GitHub
parent e21f768a92
commit 44d919c757
398 changed files with 8700 additions and 6117 deletions

View File

@@ -30,7 +30,9 @@ describe('EmbedCodeButton', () => {
};
it('renders', () => {
expect(React.isValidElement(<EmbedCodeButton {...defaultProps} />)).toBe(true);
expect(React.isValidElement(<EmbedCodeButton {...defaultProps} />)).toBe(
true,
);
});
it('renders overlay trigger', () => {
@@ -39,13 +41,15 @@ describe('EmbedCodeButton', () => {
});
it('returns correct embed code', () => {
const stub = sinon.stub(exploreUtils, 'getExploreLongUrl').callsFake(() => ('endpoint_url'));
const stub = sinon
.stub(exploreUtils, 'getExploreLongUrl')
.callsFake(() => 'endpoint_url');
const wrapper = mount(<EmbedCodeButton {...defaultProps} />);
wrapper.setState({
height: '1000',
width: '2000',
});
const embedHTML = (
const embedHTML =
'<iframe\n' +
' width="2000"\n' +
' height="1000"\n' +
@@ -54,8 +58,7 @@ describe('EmbedCodeButton', () => {
' scrolling="no"\n' +
' src="http://localhostendpoint_url&height=1000"\n' +
'>\n' +
'</iframe>'
);
'</iframe>';
expect(wrapper.instance().generateEmbedHTML()).toBe(embedHTML);
stub.restore();
});