mirror of
https://github.com/elastic/kibana.git
synced 2025-04-24 17:59:23 -04:00
fix src/core/public/application react/no-danger violations (#51146)
This commit is contained in:
parent
35b0362177
commit
5a93c13420
2 changed files with 2 additions and 14 deletions
|
@ -64,12 +64,6 @@ module.exports = {
|
|||
'jsx-a11y/no-onchange': 'off',
|
||||
},
|
||||
},
|
||||
{
|
||||
files: ['src/core/public/application/**/*.{js,ts,tsx}'],
|
||||
rules: {
|
||||
'react/no-danger': 'off',
|
||||
},
|
||||
},
|
||||
{
|
||||
files: ['src/legacy/core_plugins/console/**/*.{js,ts,tsx}'],
|
||||
rules: {
|
||||
|
|
|
@ -18,7 +18,6 @@
|
|||
*/
|
||||
|
||||
import React from 'react';
|
||||
import ReactDOM from 'react-dom';
|
||||
import { mount, ReactWrapper } from 'enzyme';
|
||||
import { createMemoryHistory, History } from 'history';
|
||||
import { BehaviorSubject } from 'rxjs';
|
||||
|
@ -31,13 +30,8 @@ import { AppRouter, AppNotFound } from '../ui';
|
|||
|
||||
const createMountHandler = (htmlString: string) =>
|
||||
jest.fn(async ({ appBasePath: basename, element: el }: AppMountParameters) => {
|
||||
ReactDOM.render(
|
||||
<div
|
||||
dangerouslySetInnerHTML={{ __html: `\nbasename: ${basename}\nhtml: ${htmlString}\n` }}
|
||||
/>,
|
||||
el
|
||||
);
|
||||
return jest.fn(() => ReactDOM.unmountComponentAtNode(el));
|
||||
el.innerHTML = `<div>\nbasename: ${basename}\nhtml: ${htmlString}\n</div>`;
|
||||
return jest.fn(() => (el.innerHTML = ''));
|
||||
});
|
||||
|
||||
describe('AppContainer', () => {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue