mirror of
https://github.com/elastic/kibana.git
synced 2025-04-24 17:59:23 -04:00
* chore(NA): introduce preset for jest-integration tests on @kbn/test * chore(NA): fix lockfile * chore(NA): fix ci * fix tests (#14) Co-authored-by: Mikhail Shustov <restrry@gmail.com> Co-authored-by: Kibana Machine <42973632+kibanamachine@users.noreply.github.com> Co-authored-by: Tiago Costa <tiagoffcc@hotmail.com> Co-authored-by: Mikhail Shustov <restrry@gmail.com>
This commit is contained in:
parent
37c61092c9
commit
7ef09fc7b6
4 changed files with 31 additions and 17 deletions
|
@ -6,24 +6,8 @@
|
|||
* Side Public License, v 1.
|
||||
*/
|
||||
|
||||
const preset = require('@kbn/test/jest-preset');
|
||||
|
||||
module.exports = {
|
||||
preset: '@kbn/test',
|
||||
preset: '@kbn/test/jest_integration',
|
||||
rootDir: '.',
|
||||
roots: ['<rootDir>/src', '<rootDir>/packages'],
|
||||
testMatch: ['**/integration_tests**/*.test.{js,mjs,ts,tsx}'],
|
||||
testPathIgnorePatterns: preset.testPathIgnorePatterns.filter(
|
||||
(pattern) => !pattern.includes('integration_tests')
|
||||
),
|
||||
setupFilesAfterEnv: [
|
||||
'<rootDir>/node_modules/@kbn/test/target_node/jest/setup/after_env.integration.js',
|
||||
],
|
||||
reporters: [
|
||||
'default',
|
||||
['@kbn/test/target_node/jest/junit_reporter', { reportName: 'Jest Integration Tests' }],
|
||||
],
|
||||
coverageReporters: !!process.env.CI
|
||||
? [['json', { file: 'jest-integration.json' }]]
|
||||
: ['html', 'text'],
|
||||
};
|
||||
|
|
|
@ -28,6 +28,7 @@ filegroup(
|
|||
NPM_MODULE_EXTRA_FILES = [
|
||||
"jest/package.json",
|
||||
"jest-preset.js",
|
||||
"jest_integration/jest-preset.js",
|
||||
"jest.config.js",
|
||||
"README.md",
|
||||
"package.json",
|
||||
|
|
28
packages/kbn-test/jest_integration/jest-preset.js
Normal file
28
packages/kbn-test/jest_integration/jest-preset.js
Normal file
|
@ -0,0 +1,28 @@
|
|||
/*
|
||||
* Copyright Elasticsearch B.V. and/or licensed to Elasticsearch B.V. under one
|
||||
* or more contributor license agreements. Licensed under the Elastic License
|
||||
* 2.0 and the Server Side Public License, v 1; you may not use this file except
|
||||
* in compliance with, at your election, the Elastic License 2.0 or the Server
|
||||
* Side Public License, v 1.
|
||||
*/
|
||||
|
||||
const preset = require('../jest-preset');
|
||||
|
||||
module.exports = {
|
||||
...preset,
|
||||
testMatch: ['**/integration_tests**/*.test.{js,mjs,ts,tsx}'],
|
||||
testPathIgnorePatterns: preset.testPathIgnorePatterns.filter(
|
||||
(pattern) => !pattern.includes('integration_tests')
|
||||
),
|
||||
setupFilesAfterEnv: [
|
||||
'<rootDir>/node_modules/@kbn/test/target_node/jest/setup/after_env.integration.js',
|
||||
'<rootDir>/node_modules/@kbn/test/target_node/jest/setup/mocks.js',
|
||||
],
|
||||
reporters: [
|
||||
'default',
|
||||
['@kbn/test/target_node/jest/junit_reporter', { reportName: 'Jest Integration Tests' }],
|
||||
],
|
||||
coverageReporters: !!process.env.CI
|
||||
? [['json', { file: 'jest-integration.json' }]]
|
||||
: ['html', 'text'],
|
||||
};
|
|
@ -39,6 +39,7 @@ export const IGNORE_FILE_GLOBS = [
|
|||
'vars/*',
|
||||
'.ci/pipeline-library/**/*',
|
||||
'packages/kbn-test/jest-preset.js',
|
||||
'packages/kbn-test/jest_integration/jest-preset.js',
|
||||
'test/package/Vagrantfile',
|
||||
'**/test/**/fixtures/**/*',
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue