Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[8.x] [kbn-test] fix junit report test for local run (#198120) #198254

Open
wants to merge 1 commit into
base: 8.x
Choose a base branch
from

Commits on Oct 30, 2024

  1. [kbn-test] fix junit report test for local run (elastic#198120)

    ## Summary
    
    When I run test locally with `node scripts/jest --config
    packages/kbn-test/jest.config.js`, it fails with
    
    ```
     FAIL  packages/kbn-test/src/mocha/junit_report_generation.test.js
      ● dev/mocha/junit report generation › reports on failed setup hooks
    
        expect(received).toEqual(expected) // deep equality
    
        - Expected  - 1
        + Received  + 1
    
        @@ -1,7 +1,7 @@
          Object {
        -   "command-line": "node scripts/jest --config=packages/kbn-test/jest.config.js --runInBand --coverage=false --passWithNoTests",
        +   "command-line": "node node_modules/jest-worker/build/workers/processChild.js",
            "failures": "2",
            "metadata-json": "{}",
            "name": "test",
            "skipped": "1",
            "tests": "4",
    ```
    
    This PR uses `process.env.CI` as a condition to apply different value
    for `command-line` property so test will pass locally too.
    
    (cherry picked from commit ec72eb2)
    dmlemeshko committed Oct 30, 2024
    Configuration menu
    Copy the full SHA
    ec9da5a View commit details
    Browse the repository at this point in the history