Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Browse files
Browse the repository at this point in the history
# Backport This will backport the following commits from `main` to `8.x`: - [[kbn-test] fix junit report test for local run (#198120)](#198120) <!--- Backport version: 9.4.3 --> ### Questions ? Please refer to the [Backport tool documentation](https://github.com/sqren/backport) <!--BACKPORT [{"author":{"name":"Dzmitry Lemechko","email":"[email protected]"},"sourceCommit":{"committedDate":"2024-10-30T08:32:40Z","message":"[kbn-test] fix junit report test for local run (#198120)\n\n## Summary\r\n\r\nWhen I run test locally with `node scripts/jest --config\r\npackages/kbn-test/jest.config.js`, it fails with\r\n\r\n```\r\n FAIL packages/kbn-test/src/mocha/junit_report_generation.test.js\r\n ● dev/mocha/junit report generation › reports on failed setup hooks\r\n\r\n expect(received).toEqual(expected) // deep equality\r\n\r\n - Expected - 1\r\n + Received + 1\r\n\r\n @@ -1,7 +1,7 @@\r\n Object {\r\n - \"command-line\": \"node scripts/jest --config=packages/kbn-test/jest.config.js --runInBand --coverage=false --passWithNoTests\",\r\n + \"command-line\": \"node node_modules/jest-worker/build/workers/processChild.js\",\r\n \"failures\": \"2\",\r\n \"metadata-json\": \"{}\",\r\n \"name\": \"test\",\r\n \"skipped\": \"1\",\r\n \"tests\": \"4\",\r\n```\r\n\r\nThis PR uses `process.env.CI` as a condition to apply different value\r\nfor `command-line` property so test will pass locally too.","sha":"ec72eb22239838e58e277d28a8b0faf4d3acff59","branchLabelMapping":{"^v9.0.0$":"main","^v8.17.0$":"8.x","^v(\\d+).(\\d+).\\d+$":"$1.$2"}},"sourcePullRequest":{"labels":["release_note:skip","v9.0.0","backport:version","v8.17.0"],"title":"[kbn-test] fix junit report test for local run","number":198120,"url":"https://github.com/elastic/kibana/pull/198120","mergeCommit":{"message":"[kbn-test] fix junit report test for local run (#198120)\n\n## Summary\r\n\r\nWhen I run test locally with `node scripts/jest --config\r\npackages/kbn-test/jest.config.js`, it fails with\r\n\r\n```\r\n FAIL packages/kbn-test/src/mocha/junit_report_generation.test.js\r\n ● dev/mocha/junit report generation › reports on failed setup hooks\r\n\r\n expect(received).toEqual(expected) // deep equality\r\n\r\n - Expected - 1\r\n + Received + 1\r\n\r\n @@ -1,7 +1,7 @@\r\n Object {\r\n - \"command-line\": \"node scripts/jest --config=packages/kbn-test/jest.config.js --runInBand --coverage=false --passWithNoTests\",\r\n + \"command-line\": \"node node_modules/jest-worker/build/workers/processChild.js\",\r\n \"failures\": \"2\",\r\n \"metadata-json\": \"{}\",\r\n \"name\": \"test\",\r\n \"skipped\": \"1\",\r\n \"tests\": \"4\",\r\n```\r\n\r\nThis PR uses `process.env.CI` as a condition to apply different value\r\nfor `command-line` property so test will pass locally too.","sha":"ec72eb22239838e58e277d28a8b0faf4d3acff59"}},"sourceBranch":"main","suggestedTargetBranches":["8.x"],"targetPullRequestStates":[{"branch":"main","label":"v9.0.0","branchLabelMappingKey":"^v9.0.0$","isSourceBranch":true,"state":"MERGED","url":"https://github.com/elastic/kibana/pull/198120","number":198120,"mergeCommit":{"message":"[kbn-test] fix junit report test for local run (#198120)\n\n## Summary\r\n\r\nWhen I run test locally with `node scripts/jest --config\r\npackages/kbn-test/jest.config.js`, it fails with\r\n\r\n```\r\n FAIL packages/kbn-test/src/mocha/junit_report_generation.test.js\r\n ● dev/mocha/junit report generation › reports on failed setup hooks\r\n\r\n expect(received).toEqual(expected) // deep equality\r\n\r\n - Expected - 1\r\n + Received + 1\r\n\r\n @@ -1,7 +1,7 @@\r\n Object {\r\n - \"command-line\": \"node scripts/jest --config=packages/kbn-test/jest.config.js --runInBand --coverage=false --passWithNoTests\",\r\n + \"command-line\": \"node node_modules/jest-worker/build/workers/processChild.js\",\r\n \"failures\": \"2\",\r\n \"metadata-json\": \"{}\",\r\n \"name\": \"test\",\r\n \"skipped\": \"1\",\r\n \"tests\": \"4\",\r\n```\r\n\r\nThis PR uses `process.env.CI` as a condition to apply different value\r\nfor `command-line` property so test will pass locally too.","sha":"ec72eb22239838e58e277d28a8b0faf4d3acff59"}},{"branch":"8.x","label":"v8.17.0","branchLabelMappingKey":"^v8.17.0$","isSourceBranch":false,"state":"NOT_CREATED"}]}] BACKPORT--> Co-authored-by: Dzmitry Lemechko <[email protected]>
- Loading branch information