From 491101feafd3168be8f6ec37854ba30e7446a895 Mon Sep 17 00:00:00 2001 From: Dzmitry Lemechko Date: Tue, 29 Oct 2024 08:10:28 +0100 Subject: [PATCH] [kbn-test] fix junit report test for local run --- .../kbn-test/src/mocha/junit_report_generation.test.js | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) diff --git a/packages/kbn-test/src/mocha/junit_report_generation.test.js b/packages/kbn-test/src/mocha/junit_report_generation.test.js index caf023a795154..6dbc8bf6cf1f8 100644 --- a/packages/kbn-test/src/mocha/junit_report_generation.test.js +++ b/packages/kbn-test/src/mocha/junit_report_generation.test.js @@ -55,9 +55,12 @@ describe('dev/mocha/junit report generation', () => { const [testsuite] = report.testsuites.testsuite; expect(testsuite.$.time).toMatch(DURATION_REGEX); expect(testsuite.$.timestamp).toMatch(ISO_DATE_SEC_REGEX); - expect(testsuite.$).toEqual({ - 'command-line': - 'node scripts/jest --config=packages/kbn-test/jest.config.js --runInBand --coverage=false --passWithNoTests', + const expectedCommandLine = process.env.CI + ? 'node scripts/jest --config=packages/kbn-test/jest.config.js --runInBand --coverage=false --passWithNoTests' + : 'node node_modules/jest-worker/build/workers/processChild.js'; + + expect(testsuite.$).toMatchObject({ + 'command-line': expectedCommandLine, failures: '2', name: 'test', skipped: '1',