mirror of
https://github.com/elastic/kibana.git
synced 2025-04-24 09:48:58 -04:00
Backports the following commits to 6.x: - Remove testURL hotfix from jest upgrade (#22953)
This commit is contained in:
parent
fcdebbb44c
commit
a82af2817e
5 changed files with 11 additions and 9 deletions
|
@ -16,13 +16,13 @@
|
|||
* specific language governing permissions and limitations
|
||||
* under the License.
|
||||
*/
|
||||
|
||||
import './setup_mocks';
|
||||
import ace from 'brace';
|
||||
import 'brace/mode/json';
|
||||
const $ = require('jquery');
|
||||
import $ from 'jquery';
|
||||
import { initializeInput } from '../../src/input';
|
||||
|
||||
|
||||
const tokenIterator = ace.acequire('ace/token_iterator');
|
||||
|
||||
describe('Input Tokenization', () => {
|
||||
|
|
|
@ -23,4 +23,10 @@ window.URL = {
|
|||
createObjectURL: () => { return ''; }
|
||||
};
|
||||
jest.mock('../../src/storage');
|
||||
document.queryCommandSupported = () => true;
|
||||
|
||||
document.queryCommandSupported = () => true;
|
||||
|
||||
import jQuery from 'jquery';
|
||||
jest.spyOn(jQuery, 'ajax').mockImplementation(() => new Promise(() => {
|
||||
// never resolve
|
||||
}));
|
||||
|
|
|
@ -96,6 +96,4 @@ export default {
|
|||
'default',
|
||||
'<rootDir>/src/dev/jest/junit_reporter.js',
|
||||
],
|
||||
// TODO: prevent tests from making web requests that rely on this setting, see https://github.com/facebook/jest/pull/6792
|
||||
testURL: 'about:blank',
|
||||
};
|
||||
|
|
|
@ -129,7 +129,7 @@ exports[`render 1`] = `
|
|||
<EuiCopy
|
||||
afterMessage="Copied"
|
||||
anchorClassName="sharePanel__copyAnchor"
|
||||
textToCopy="about:blank"
|
||||
textToCopy="http://localhost/"
|
||||
/>
|
||||
</EuiForm>
|
||||
`;
|
||||
|
@ -262,7 +262,7 @@ exports[`should enable saved object export option when objectId is provided 1`]
|
|||
<EuiCopy
|
||||
afterMessage="Copied"
|
||||
anchorClassName="sharePanel__copyAnchor"
|
||||
textToCopy="about:blank"
|
||||
textToCopy="http://localhost/"
|
||||
/>
|
||||
</EuiForm>
|
||||
`;
|
||||
|
|
|
@ -51,7 +51,5 @@ export function createJestConfig({
|
|||
rootDirectory: xPackKibanaDirectory,
|
||||
}]
|
||||
],
|
||||
// TODO: prevent tests from making web requests that rely on this setting, see https://github.com/facebook/jest/pull/6792
|
||||
testURL: 'about:blank',
|
||||
};
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue