Skip to content

Commit

Permalink
Updates to Jest configuration (#125727)
Browse files Browse the repository at this point in the history
(cherry picked from commit e9d82d1)

# Conflicts:
#	.buildkite/scripts/steps/code_coverage/jest.sh
  • Loading branch information
Tyler Smalley committed Feb 16, 2022
1 parent baf7be9 commit 73982e8
Show file tree
Hide file tree
Showing 7 changed files with 6 additions and 56 deletions.
1 change: 1 addition & 0 deletions .buildkite/pipelines/es_snapshots/verify.yml
Original file line number Diff line number Diff line change
Expand Up @@ -65,6 +65,7 @@ steps:

- command: .buildkite/scripts/steps/test/jest_integration.sh
label: 'Jest Integration Tests'
parallelism: 2
agents:
queue: n2-4
timeout_in_minutes: 120
Expand Down
2 changes: 1 addition & 1 deletion .buildkite/scripts/steps/test/jest.sh
Original file line number Diff line number Diff line change
Expand Up @@ -10,4 +10,4 @@ is_test_execution_step

echo '--- Jest'
checks-reporter-with-killswitch "Jest Unit Tests $((BUILDKITE_PARALLEL_JOB+1))" \
.buildkite/scripts/steps/test/jest_parallel.sh
.buildkite/scripts/steps/test/jest_parallel.sh jest.config.js
2 changes: 1 addition & 1 deletion .buildkite/scripts/steps/test/jest_parallel.sh
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,6 @@ while read -r config; do

((i=i+1))
# uses heredoc to avoid the while loop being in a sub-shell thus unable to overwrite exitCode
done <<< "$(find src x-pack packages -name ${1:-jest.config.js} -not -path "*/__fixtures__/*" | sort)"
done <<< "$(find src x-pack packages -name "$1" -not -path "*/__fixtures__/*" | sort)"

exit $exitCode
27 changes: 0 additions & 27 deletions jest.config.integration.js

This file was deleted.

24 changes: 0 additions & 24 deletions jest.config.js

This file was deleted.

4 changes: 2 additions & 2 deletions packages/kbn-test/src/jest/run_check_jest_configs_cli.ts
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ import { writeFileSync } from 'fs';
import path from 'path';
import Mustache from 'mustache';

import { run } from '@kbn/dev-utils';
import { run, createFailError } from '@kbn/dev-utils';
import { REPO_ROOT } from '@kbn/utils';

import { JestConfigs, CONFIG_NAMES } from './configs';
Expand Down Expand Up @@ -72,7 +72,7 @@ export async function runCheckJestConfigsCli() {
log.info('created %s', file);
});
} else {
log.info(
throw createFailError(
`Run 'node scripts/check_jest_configs --fix' to create the missing config files`
);
}
Expand Down
2 changes: 1 addition & 1 deletion scripts/jest_integration.js
Original file line number Diff line number Diff line change
Expand Up @@ -9,4 +9,4 @@
require('../src/setup_node_env/ensure_node_preserve_symlinks');
process.argv.push('--runInBand');

require('@kbn/test').runJest('jest.config.integration.js');
require('@kbn/test').runJest('jest.integration.config.js');

0 comments on commit 73982e8

Please sign in to comment.