[jest] temporarily extend default test timeout (#75118)

* [jest] temporarily extend default test timeout

* fix, 30 seconds

Co-authored-by: spalger <spalger@users.noreply.github.com>
This commit is contained in:
Spencer 2020-08-15 13:31:37 -07:00 committed by GitHub
parent 41262d1b64
commit cf93604e43
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
3 changed files with 27 additions and 0 deletions

View file

@ -78,6 +78,7 @@ export default {
setupFilesAfterEnv: [
'<rootDir>/src/dev/jest/setup/mocks.js',
'<rootDir>/src/dev/jest/setup/react_testing_library.js',
'<rootDir>/src/dev/jest/setup/default_timeout.js',
],
coverageDirectory: '<rootDir>/target/kibana-coverage/jest',
coverageReporters: !!process.env.CODE_COVERAGE ? ['json'] : ['html', 'text'],

View file

@ -0,0 +1,25 @@
/*
* Licensed to Elasticsearch B.V. under one or more contributor
* license agreements. See the NOTICE file distributed with
* this work for additional information regarding copyright
* ownership. Elasticsearch B.V. licenses this file to you under
* the Apache License, Version 2.0 (the "License"); you may
* not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing,
* software distributed under the License is distributed on an
* "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
* KIND, either express or implied. See the License for the
* specific language governing permissions and limitations
* under the License.
*/
/* eslint-env jest */
/**
* Set the default timeout for the unit tests to 30 seconds, temporarily
*/
jest.setTimeout(30 * 1000);

View file

@ -58,6 +58,7 @@ export function createJestConfig({ kibanaDirectory, rootDir, xPackKibanaDirector
`${xPackKibanaDirectory}/dev-tools/jest/setup/setup_test.js`,
`${kibanaDirectory}/src/dev/jest/setup/mocks.js`,
`${kibanaDirectory}/src/dev/jest/setup/react_testing_library.js`,
`${kibanaDirectory}/src/dev/jest/setup/default_timeout.js`,
],
testEnvironment: 'jest-environment-jsdom-thirteen',
testMatch: ['**/*.test.{js,mjs,ts,tsx}'],