Skip to content
This repository has been archived by the owner on Mar 31, 2024. It is now read-only.

Commit

Permalink
[jest] temporarily extend default test timeout (elastic#75118)
Browse files Browse the repository at this point in the history
* [jest] temporarily extend default test timeout

* fix, 30 seconds

Co-authored-by: spalger <[email protected]>
  • Loading branch information
Spencer and spalger committed Aug 15, 2020
1 parent 3099fa6 commit 412ac33
Show file tree
Hide file tree
Showing 3 changed files with 27 additions and 0 deletions.
1 change: 1 addition & 0 deletions src/dev/jest/config.js
Original file line number Diff line number Diff line change
Expand Up @@ -75,6 +75,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: ['html', 'text'],
Expand Down
25 changes: 25 additions & 0 deletions src/dev/jest/setup/default_timeout.js
Original file line number Diff line number Diff line change
@@ -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);
1 change: 1 addition & 0 deletions x-pack/dev-tools/jest/create_jest_config.js
Original file line number Diff line number Diff line change
Expand Up @@ -56,6 +56,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}'],
Expand Down

0 comments on commit 412ac33

Please sign in to comment.