[@kbn/scout-{oblt,search,security}] Update Solutions API tests to use API expect#250772
Merged
steliosmavro merged 2 commits intoelastic:mainfrom Jan 29, 2026
Merged
Conversation
mistic
approved these changes
Jan 28, 2026
Contributor
mistic
left a comment
There was a problem hiding this comment.
Changes on filed owned by Operations team LGTM
smith
approved these changes
Jan 28, 2026
Contributor
smith
left a comment
There was a problem hiding this comment.
Profiling test changes look ok.
TattdCodeMonkey
approved these changes
Jan 28, 2026
Contributor
💚 Build Succeeded
Metrics [docs]
|
expectexpect
dmlemeshko
reviewed
Jan 29, 2026
Comment on lines
+46
to
60
| export function wrapMatcher<TArgs extends unknown[], TReturn>( | ||
| fn: (...args: TArgs) => TReturn | ||
| ): (...args: TArgs) => TReturn { | ||
| const wrapper = (...args: TArgs): TReturn => { | ||
| try { | ||
| return fn(...args); | ||
| } catch (error) { | ||
| if (error instanceof Error) { | ||
| Error.captureStackTrace(error, wrapper); | ||
| } | ||
| throw error; | ||
| } | ||
| }; | ||
| return wrapper; | ||
| } |
Contributor
There was a problem hiding this comment.
nice addtion! can you post here the stacktrace example?
Contributor
Author
MadameSheema
approved these changes
Jan 29, 2026
dmlemeshko
approved these changes
Jan 29, 2026
Contributor
|
Starting backport for target branches: 8.19, 9.1, 9.2, 9.3 https://github.com/elastic/kibana/actions/runs/21476317009 |
kibanamachine
pushed a commit
to kibanamachine/kibana
that referenced
this pull request
Jan 29, 2026
… API `expect` (elastic#250772) ## Summary Updates Solutions API tests to use the dedicated API `expect` from `@kbn/scout/api` and adds an ESLint rule to enforce correct import paths. ### Changes - Added `api.ts` exports for `@kbn/scout-oblt`, `@kbn/scout-search`, and `@kbn/scout-security` packages - Updated solutions API tests to import `expect` from `@kbn/scout-oblt/api` - Changed assertions from `toBeTruthy()`/`toBeFalsy()` to explicit `toBe(true)`/`toBe(false)` - Refactored stack trace handling to use native `Error.captureStackTrace` instead of manually filtering stack lines - Added ESLint rule `scout_expect_import` to validate `expect` imports based on test type (api/ui) (cherry picked from commit 96d91d8)
Contributor
💔 Some backports could not be created
Note: Successful backport PRs will be merged automatically after passing CI. Manual backportTo create the backport manually run: Questions ?Please refer to the Backport tool documentation |
steliosmavro
added a commit
to steliosmavro/kibana
that referenced
this pull request
Jan 29, 2026
… API `expect` (elastic#250772) ## Summary Updates Solutions API tests to use the dedicated API `expect` from `@kbn/scout/api` and adds an ESLint rule to enforce correct import paths. ### Changes - Added `api.ts` exports for `@kbn/scout-oblt`, `@kbn/scout-search`, and `@kbn/scout-security` packages - Updated solutions API tests to import `expect` from `@kbn/scout-oblt/api` - Changed assertions from `toBeTruthy()`/`toBeFalsy()` to explicit `toBe(true)`/`toBe(false)` - Refactored stack trace handling to use native `Error.captureStackTrace` instead of manually filtering stack lines - Added ESLint rule `scout_expect_import` to validate `expect` imports based on test type (api/ui) (cherry picked from commit 96d91d8)
steliosmavro
added a commit
to steliosmavro/kibana
that referenced
this pull request
Jan 29, 2026
… API `expect` (elastic#250772) ## Summary Updates Solutions API tests to use the dedicated API `expect` from `@kbn/scout/api` and adds an ESLint rule to enforce correct import paths. ### Changes - Added `api.ts` exports for `@kbn/scout-oblt`, `@kbn/scout-search`, and `@kbn/scout-security` packages - Updated solutions API tests to import `expect` from `@kbn/scout-oblt/api` - Changed assertions from `toBeTruthy()`/`toBeFalsy()` to explicit `toBe(true)`/`toBe(false)` - Refactored stack trace handling to use native `Error.captureStackTrace` instead of manually filtering stack lines - Added ESLint rule `scout_expect_import` to validate `expect` imports based on test type (api/ui) (cherry picked from commit 96d91d8) # Conflicts: # x-pack/solutions/observability/plugins/profiling/test/scout/api/tests/has_no_setup.spec.ts # x-pack/solutions/observability/plugins/profiling/test/scout/api/tests/has_setup_apm_not_installed.spec.ts # x-pack/solutions/observability/plugins/profiling/test/scout/api/tests/has_setup_with_data.spec.ts # x-pack/solutions/observability/plugins/profiling/test/scout/api/tests/has_setup_with_integrations.spec.ts
steliosmavro
added a commit
to steliosmavro/kibana
that referenced
this pull request
Jan 29, 2026
… API `expect` (elastic#250772) ## Summary Updates Solutions API tests to use the dedicated API `expect` from `@kbn/scout/api` and adds an ESLint rule to enforce correct import paths. ### Changes - Added `api.ts` exports for `@kbn/scout-oblt`, `@kbn/scout-search`, and `@kbn/scout-security` packages - Updated solutions API tests to import `expect` from `@kbn/scout-oblt/api` - Changed assertions from `toBeTruthy()`/`toBeFalsy()` to explicit `toBe(true)`/`toBe(false)` - Refactored stack trace handling to use native `Error.captureStackTrace` instead of manually filtering stack lines - Added ESLint rule `scout_expect_import` to validate `expect` imports based on test type (api/ui) (cherry picked from commit 96d91d8) # Conflicts: # x-pack/solutions/observability/plugins/profiling/test/scout/api/tests/has_no_setup.spec.ts # x-pack/solutions/observability/plugins/profiling/test/scout/api/tests/has_setup_apm_not_installed.spec.ts # x-pack/solutions/observability/plugins/profiling/test/scout/api/tests/has_setup_with_data.spec.ts # x-pack/solutions/observability/plugins/profiling/test/scout/api/tests/has_setup_with_integrations.spec.ts
Contributor
Author
💚 All backports created successfully
Note: Successful backport PRs will be merged automatically after passing CI. Questions ?Please refer to the Backport tool documentation |
steliosmavro
added a commit
to steliosmavro/kibana
that referenced
this pull request
Jan 29, 2026
… API `expect` (elastic#250772) ## Summary Updates Solutions API tests to use the dedicated API `expect` from `@kbn/scout/api` and adds an ESLint rule to enforce correct import paths. ### Changes - Added `api.ts` exports for `@kbn/scout-oblt`, `@kbn/scout-search`, and `@kbn/scout-security` packages - Updated solutions API tests to import `expect` from `@kbn/scout-oblt/api` - Changed assertions from `toBeTruthy()`/`toBeFalsy()` to explicit `toBe(true)`/`toBe(false)` - Refactored stack trace handling to use native `Error.captureStackTrace` instead of manually filtering stack lines - Added ESLint rule `scout_expect_import` to validate `expect` imports based on test type (api/ui) (cherry picked from commit 96d91d8) # Conflicts: # .eslintrc.js # x-pack/solutions/observability/plugins/profiling/test/scout/api/tests/has_no_setup.spec.ts # x-pack/solutions/observability/plugins/profiling/test/scout/api/tests/has_setup_apm_not_installed.spec.ts # x-pack/solutions/observability/plugins/profiling/test/scout/api/tests/has_setup_with_data.spec.ts # x-pack/solutions/observability/plugins/profiling/test/scout/api/tests/has_setup_with_integrations.spec.ts
Merged
delanni
added a commit
that referenced
this pull request
Jan 29, 2026
kibanamachine
added a commit
that referenced
this pull request
Jan 29, 2026
…to use API `expect` (#250772) (#250877) # Backport This will backport the following commits from `main` to `9.3`: - [[@kbn/scout-{oblt,search,security}] Update Solutions API tests to use API `expect` (#250772)](#250772) <!--- Backport version: 9.6.6 --> ### Questions ? Please refer to the [Backport tool documentation](https://github.com/sorenlouv/backport) <!--BACKPORT [{"author":{"name":"Stelios Mavro","email":"81311181+steliosmavro@users.noreply.github.com"},"sourceCommit":{"committedDate":"2026-01-29T11:25:37Z","message":"[@kbn/scout-{oblt,search,security}] Update Solutions API tests to use API `expect` (#250772)\n\n## Summary\n\nUpdates Solutions API tests to use the dedicated API `expect` from\n`@kbn/scout/api` and adds an ESLint rule to enforce correct import\npaths.\n\n### Changes\n\n- Added `api.ts` exports for `@kbn/scout-oblt`, `@kbn/scout-search`, and\n`@kbn/scout-security` packages\n- Updated solutions API tests to import `expect` from\n`@kbn/scout-oblt/api`\n- Changed assertions from `toBeTruthy()`/`toBeFalsy()` to explicit\n`toBe(true)`/`toBe(false)`\n- Refactored stack trace handling to use native\n`Error.captureStackTrace` instead of manually filtering stack lines\n- Added ESLint rule `scout_expect_import` to validate `expect` imports\nbased on test type (api/ui)","sha":"96d91d8d67257f7cddcc67fa861c0fd5a27b942c","branchLabelMapping":{"^v9.4.0$":"main","^v(\\d+).(\\d+).\\d+$":"$1.$2"}},"sourcePullRequest":{"labels":["release_note:skip","backport:all-open","test:scout","v9.4.0"],"title":"[@kbn/scout-{oblt,search,security}] Update Solutions API tests to use API `expect`","number":250772,"url":"https://github.com/elastic/kibana/pull/250772","mergeCommit":{"message":"[@kbn/scout-{oblt,search,security}] Update Solutions API tests to use API `expect` (#250772)\n\n## Summary\n\nUpdates Solutions API tests to use the dedicated API `expect` from\n`@kbn/scout/api` and adds an ESLint rule to enforce correct import\npaths.\n\n### Changes\n\n- Added `api.ts` exports for `@kbn/scout-oblt`, `@kbn/scout-search`, and\n`@kbn/scout-security` packages\n- Updated solutions API tests to import `expect` from\n`@kbn/scout-oblt/api`\n- Changed assertions from `toBeTruthy()`/`toBeFalsy()` to explicit\n`toBe(true)`/`toBe(false)`\n- Refactored stack trace handling to use native\n`Error.captureStackTrace` instead of manually filtering stack lines\n- Added ESLint rule `scout_expect_import` to validate `expect` imports\nbased on test type (api/ui)","sha":"96d91d8d67257f7cddcc67fa861c0fd5a27b942c"}},"sourceBranch":"main","suggestedTargetBranches":[],"targetPullRequestStates":[{"branch":"main","label":"v9.4.0","branchLabelMappingKey":"^v9.4.0$","isSourceBranch":true,"state":"MERGED","url":"https://github.com/elastic/kibana/pull/250772","number":250772,"mergeCommit":{"message":"[@kbn/scout-{oblt,search,security}] Update Solutions API tests to use API `expect` (#250772)\n\n## Summary\n\nUpdates Solutions API tests to use the dedicated API `expect` from\n`@kbn/scout/api` and adds an ESLint rule to enforce correct import\npaths.\n\n### Changes\n\n- Added `api.ts` exports for `@kbn/scout-oblt`, `@kbn/scout-search`, and\n`@kbn/scout-security` packages\n- Updated solutions API tests to import `expect` from\n`@kbn/scout-oblt/api`\n- Changed assertions from `toBeTruthy()`/`toBeFalsy()` to explicit\n`toBe(true)`/`toBe(false)`\n- Refactored stack trace handling to use native\n`Error.captureStackTrace` instead of manually filtering stack lines\n- Added ESLint rule `scout_expect_import` to validate `expect` imports\nbased on test type (api/ui)","sha":"96d91d8d67257f7cddcc67fa861c0fd5a27b942c"}}]}] BACKPORT--> Co-authored-by: Stelios Mavro <81311181+steliosmavro@users.noreply.github.com>
steliosmavro
added a commit
that referenced
this pull request
Jan 30, 2026
…to use API `expect` (#250772) (#250879) # Backport This will backport the following commits from `main` to `9.2`: - [[@kbn/scout-{oblt,search,security}] Update Solutions API tests to use API `expect` (#250772)](#250772) <!--- Backport version: 10.2.0 --> ### Questions ? Please refer to the [Backport tool documentation](https://github.com/sorenlouv/backport) <!--BACKPORT [{"author":{"name":"Stelios Mavro","email":"81311181+steliosmavro@users.noreply.github.com"},"sourceCommit":{"committedDate":"2026-01-29T11:25:37Z","message":"[@kbn/scout-{oblt,search,security}] Update Solutions API tests to use API `expect` (#250772)\n\n## Summary\n\nUpdates Solutions API tests to use the dedicated API `expect` from\n`@kbn/scout/api` and adds an ESLint rule to enforce correct import\npaths.\n\n### Changes\n\n- Added `api.ts` exports for `@kbn/scout-oblt`, `@kbn/scout-search`, and\n`@kbn/scout-security` packages\n- Updated solutions API tests to import `expect` from\n`@kbn/scout-oblt/api`\n- Changed assertions from `toBeTruthy()`/`toBeFalsy()` to explicit\n`toBe(true)`/`toBe(false)`\n- Refactored stack trace handling to use native\n`Error.captureStackTrace` instead of manually filtering stack lines\n- Added ESLint rule `scout_expect_import` to validate `expect` imports\nbased on test type (api/ui)","sha":"96d91d8d67257f7cddcc67fa861c0fd5a27b942c","branchLabelMapping":{"^v9.4.0$":"main","^v(\\d+).(\\d+).\\d+$":"$1.$2"}},"sourcePullRequest":{"labels":["release_note:skip","backport:all-open","test:scout","v9.4.0"],"title":"[@kbn/scout-{oblt,search,security}] Update Solutions API tests to use API `expect`","number":250772,"url":"https://github.com/elastic/kibana/pull/250772","mergeCommit":{"message":"[@kbn/scout-{oblt,search,security}] Update Solutions API tests to use API `expect` (#250772)\n\n## Summary\n\nUpdates Solutions API tests to use the dedicated API `expect` from\n`@kbn/scout/api` and adds an ESLint rule to enforce correct import\npaths.\n\n### Changes\n\n- Added `api.ts` exports for `@kbn/scout-oblt`, `@kbn/scout-search`, and\n`@kbn/scout-security` packages\n- Updated solutions API tests to import `expect` from\n`@kbn/scout-oblt/api`\n- Changed assertions from `toBeTruthy()`/`toBeFalsy()` to explicit\n`toBe(true)`/`toBe(false)`\n- Refactored stack trace handling to use native\n`Error.captureStackTrace` instead of manually filtering stack lines\n- Added ESLint rule `scout_expect_import` to validate `expect` imports\nbased on test type (api/ui)","sha":"96d91d8d67257f7cddcc67fa861c0fd5a27b942c"}},"sourceBranch":"main","suggestedTargetBranches":[],"targetPullRequestStates":[{"branch":"main","label":"v9.4.0","branchLabelMappingKey":"^v9.4.0$","isSourceBranch":true,"state":"MERGED","url":"https://github.com/elastic/kibana/pull/250772","number":250772,"mergeCommit":{"message":"[@kbn/scout-{oblt,search,security}] Update Solutions API tests to use API `expect` (#250772)\n\n## Summary\n\nUpdates Solutions API tests to use the dedicated API `expect` from\n`@kbn/scout/api` and adds an ESLint rule to enforce correct import\npaths.\n\n### Changes\n\n- Added `api.ts` exports for `@kbn/scout-oblt`, `@kbn/scout-search`, and\n`@kbn/scout-security` packages\n- Updated solutions API tests to import `expect` from\n`@kbn/scout-oblt/api`\n- Changed assertions from `toBeTruthy()`/`toBeFalsy()` to explicit\n`toBe(true)`/`toBe(false)`\n- Refactored stack trace handling to use native\n`Error.captureStackTrace` instead of manually filtering stack lines\n- Added ESLint rule `scout_expect_import` to validate `expect` imports\nbased on test type (api/ui)","sha":"96d91d8d67257f7cddcc67fa861c0fd5a27b942c"}},{"url":"https://github.com/elastic/kibana/pull/250877","number":250877,"branch":"9.3","state":"OPEN"}]}] BACKPORT-->
steliosmavro
added a commit
that referenced
this pull request
Jan 30, 2026
…to use API `expect` (#250772) (#250878) # Backport This will backport the following commits from `main` to `9.3`: - [[@kbn/scout-{oblt,search,security}] Update Solutions API tests to use API `expect` (#250772)](#250772) <!--- Backport version: 10.2.0 --> ### Questions ? Please refer to the [Backport tool documentation](https://github.com/sorenlouv/backport) <!--BACKPORT [{"author":{"name":"Stelios Mavro","email":"81311181+steliosmavro@users.noreply.github.com"},"sourceCommit":{"committedDate":"2026-01-29T11:25:37Z","message":"[@kbn/scout-{oblt,search,security}] Update Solutions API tests to use API `expect` (#250772)\n\n## Summary\n\nUpdates Solutions API tests to use the dedicated API `expect` from\n`@kbn/scout/api` and adds an ESLint rule to enforce correct import\npaths.\n\n### Changes\n\n- Added `api.ts` exports for `@kbn/scout-oblt`, `@kbn/scout-search`, and\n`@kbn/scout-security` packages\n- Updated solutions API tests to import `expect` from\n`@kbn/scout-oblt/api`\n- Changed assertions from `toBeTruthy()`/`toBeFalsy()` to explicit\n`toBe(true)`/`toBe(false)`\n- Refactored stack trace handling to use native\n`Error.captureStackTrace` instead of manually filtering stack lines\n- Added ESLint rule `scout_expect_import` to validate `expect` imports\nbased on test type (api/ui)","sha":"96d91d8d67257f7cddcc67fa861c0fd5a27b942c","branchLabelMapping":{"^v9.4.0$":"main","^v(\\d+).(\\d+).\\d+$":"$1.$2"}},"sourcePullRequest":{"labels":["release_note:skip","backport:all-open","test:scout","v9.4.0"],"title":"[@kbn/scout-{oblt,search,security}] Update Solutions API tests to use API `expect`","number":250772,"url":"https://github.com/elastic/kibana/pull/250772","mergeCommit":{"message":"[@kbn/scout-{oblt,search,security}] Update Solutions API tests to use API `expect` (#250772)\n\n## Summary\n\nUpdates Solutions API tests to use the dedicated API `expect` from\n`@kbn/scout/api` and adds an ESLint rule to enforce correct import\npaths.\n\n### Changes\n\n- Added `api.ts` exports for `@kbn/scout-oblt`, `@kbn/scout-search`, and\n`@kbn/scout-security` packages\n- Updated solutions API tests to import `expect` from\n`@kbn/scout-oblt/api`\n- Changed assertions from `toBeTruthy()`/`toBeFalsy()` to explicit\n`toBe(true)`/`toBe(false)`\n- Refactored stack trace handling to use native\n`Error.captureStackTrace` instead of manually filtering stack lines\n- Added ESLint rule `scout_expect_import` to validate `expect` imports\nbased on test type (api/ui)","sha":"96d91d8d67257f7cddcc67fa861c0fd5a27b942c"}},"sourceBranch":"main","suggestedTargetBranches":[],"targetPullRequestStates":[{"branch":"main","label":"v9.4.0","branchLabelMappingKey":"^v9.4.0$","isSourceBranch":true,"state":"MERGED","url":"https://github.com/elastic/kibana/pull/250772","number":250772,"mergeCommit":{"message":"[@kbn/scout-{oblt,search,security}] Update Solutions API tests to use API `expect` (#250772)\n\n## Summary\n\nUpdates Solutions API tests to use the dedicated API `expect` from\n`@kbn/scout/api` and adds an ESLint rule to enforce correct import\npaths.\n\n### Changes\n\n- Added `api.ts` exports for `@kbn/scout-oblt`, `@kbn/scout-search`, and\n`@kbn/scout-security` packages\n- Updated solutions API tests to import `expect` from\n`@kbn/scout-oblt/api`\n- Changed assertions from `toBeTruthy()`/`toBeFalsy()` to explicit\n`toBe(true)`/`toBe(false)`\n- Refactored stack trace handling to use native\n`Error.captureStackTrace` instead of manually filtering stack lines\n- Added ESLint rule `scout_expect_import` to validate `expect` imports\nbased on test type (api/ui)","sha":"96d91d8d67257f7cddcc67fa861c0fd5a27b942c"}},{"url":"https://github.com/elastic/kibana/pull/250877","number":250877,"branch":"9.3","state":"OPEN"}]}] BACKPORT-->
steliosmavro
added a commit
that referenced
this pull request
Jan 30, 2026
…to use API `expect` (#250772) (#250880) # Backport This will backport the following commits from `main` to `9.1`: - [[@kbn/scout-{oblt,search,security}] Update Solutions API tests to use API `expect` (#250772)](#250772) <!--- Backport version: 10.2.0 --> ### Questions ? Please refer to the [Backport tool documentation](https://github.com/sorenlouv/backport) <!--BACKPORT [{"author":{"name":"Stelios Mavro","email":"81311181+steliosmavro@users.noreply.github.com"},"sourceCommit":{"committedDate":"2026-01-29T11:25:37Z","message":"[@kbn/scout-{oblt,search,security}] Update Solutions API tests to use API `expect` (#250772)\n\n## Summary\n\nUpdates Solutions API tests to use the dedicated API `expect` from\n`@kbn/scout/api` and adds an ESLint rule to enforce correct import\npaths.\n\n### Changes\n\n- Added `api.ts` exports for `@kbn/scout-oblt`, `@kbn/scout-search`, and\n`@kbn/scout-security` packages\n- Updated solutions API tests to import `expect` from\n`@kbn/scout-oblt/api`\n- Changed assertions from `toBeTruthy()`/`toBeFalsy()` to explicit\n`toBe(true)`/`toBe(false)`\n- Refactored stack trace handling to use native\n`Error.captureStackTrace` instead of manually filtering stack lines\n- Added ESLint rule `scout_expect_import` to validate `expect` imports\nbased on test type (api/ui)","sha":"96d91d8d67257f7cddcc67fa861c0fd5a27b942c","branchLabelMapping":{"^v9.4.0$":"main","^v(\\d+).(\\d+).\\d+$":"$1.$2"}},"sourcePullRequest":{"labels":["release_note:skip","backport:all-open","test:scout","v9.4.0"],"title":"[@kbn/scout-{oblt,search,security}] Update Solutions API tests to use API `expect`","number":250772,"url":"https://github.com/elastic/kibana/pull/250772","mergeCommit":{"message":"[@kbn/scout-{oblt,search,security}] Update Solutions API tests to use API `expect` (#250772)\n\n## Summary\n\nUpdates Solutions API tests to use the dedicated API `expect` from\n`@kbn/scout/api` and adds an ESLint rule to enforce correct import\npaths.\n\n### Changes\n\n- Added `api.ts` exports for `@kbn/scout-oblt`, `@kbn/scout-search`, and\n`@kbn/scout-security` packages\n- Updated solutions API tests to import `expect` from\n`@kbn/scout-oblt/api`\n- Changed assertions from `toBeTruthy()`/`toBeFalsy()` to explicit\n`toBe(true)`/`toBe(false)`\n- Refactored stack trace handling to use native\n`Error.captureStackTrace` instead of manually filtering stack lines\n- Added ESLint rule `scout_expect_import` to validate `expect` imports\nbased on test type (api/ui)","sha":"96d91d8d67257f7cddcc67fa861c0fd5a27b942c"}},"sourceBranch":"main","suggestedTargetBranches":[],"targetPullRequestStates":[{"branch":"main","label":"v9.4.0","branchLabelMappingKey":"^v9.4.0$","isSourceBranch":true,"state":"MERGED","url":"https://github.com/elastic/kibana/pull/250772","number":250772,"mergeCommit":{"message":"[@kbn/scout-{oblt,search,security}] Update Solutions API tests to use API `expect` (#250772)\n\n## Summary\n\nUpdates Solutions API tests to use the dedicated API `expect` from\n`@kbn/scout/api` and adds an ESLint rule to enforce correct import\npaths.\n\n### Changes\n\n- Added `api.ts` exports for `@kbn/scout-oblt`, `@kbn/scout-search`, and\n`@kbn/scout-security` packages\n- Updated solutions API tests to import `expect` from\n`@kbn/scout-oblt/api`\n- Changed assertions from `toBeTruthy()`/`toBeFalsy()` to explicit\n`toBe(true)`/`toBe(false)`\n- Refactored stack trace handling to use native\n`Error.captureStackTrace` instead of manually filtering stack lines\n- Added ESLint rule `scout_expect_import` to validate `expect` imports\nbased on test type (api/ui)","sha":"96d91d8d67257f7cddcc67fa861c0fd5a27b942c"}},{"url":"https://github.com/elastic/kibana/pull/250877","number":250877,"branch":"9.3","state":"OPEN"}]}] BACKPORT--> --------- Co-authored-by: kibanamachine <42973632+kibanamachine@users.noreply.github.com>
steliosmavro
added a commit
that referenced
this pull request
Jan 30, 2026
… to use API `expect` (#250772) (#250881) # Backport This will backport the following commits from `main` to `8.19`: - [[@kbn/scout-{oblt,search,security}] Update Solutions API tests to use API `expect` (#250772)](#250772) <!--- Backport version: 10.2.0 --> ### Questions ? Please refer to the [Backport tool documentation](https://github.com/sorenlouv/backport) <!--BACKPORT [{"author":{"name":"Stelios Mavro","email":"81311181+steliosmavro@users.noreply.github.com"},"sourceCommit":{"committedDate":"2026-01-29T11:25:37Z","message":"[@kbn/scout-{oblt,search,security}] Update Solutions API tests to use API `expect` (#250772)\n\n## Summary\n\nUpdates Solutions API tests to use the dedicated API `expect` from\n`@kbn/scout/api` and adds an ESLint rule to enforce correct import\npaths.\n\n### Changes\n\n- Added `api.ts` exports for `@kbn/scout-oblt`, `@kbn/scout-search`, and\n`@kbn/scout-security` packages\n- Updated solutions API tests to import `expect` from\n`@kbn/scout-oblt/api`\n- Changed assertions from `toBeTruthy()`/`toBeFalsy()` to explicit\n`toBe(true)`/`toBe(false)`\n- Refactored stack trace handling to use native\n`Error.captureStackTrace` instead of manually filtering stack lines\n- Added ESLint rule `scout_expect_import` to validate `expect` imports\nbased on test type (api/ui)","sha":"96d91d8d67257f7cddcc67fa861c0fd5a27b942c","branchLabelMapping":{"^v9.4.0$":"main","^v(\\d+).(\\d+).\\d+$":"$1.$2"}},"sourcePullRequest":{"labels":["release_note:skip","backport:all-open","test:scout","v9.4.0"],"title":"[@kbn/scout-{oblt,search,security}] Update Solutions API tests to use API `expect`","number":250772,"url":"https://github.com/elastic/kibana/pull/250772","mergeCommit":{"message":"[@kbn/scout-{oblt,search,security}] Update Solutions API tests to use API `expect` (#250772)\n\n## Summary\n\nUpdates Solutions API tests to use the dedicated API `expect` from\n`@kbn/scout/api` and adds an ESLint rule to enforce correct import\npaths.\n\n### Changes\n\n- Added `api.ts` exports for `@kbn/scout-oblt`, `@kbn/scout-search`, and\n`@kbn/scout-security` packages\n- Updated solutions API tests to import `expect` from\n`@kbn/scout-oblt/api`\n- Changed assertions from `toBeTruthy()`/`toBeFalsy()` to explicit\n`toBe(true)`/`toBe(false)`\n- Refactored stack trace handling to use native\n`Error.captureStackTrace` instead of manually filtering stack lines\n- Added ESLint rule `scout_expect_import` to validate `expect` imports\nbased on test type (api/ui)","sha":"96d91d8d67257f7cddcc67fa861c0fd5a27b942c"}},"sourceBranch":"main","suggestedTargetBranches":[],"targetPullRequestStates":[{"branch":"main","label":"v9.4.0","branchLabelMappingKey":"^v9.4.0$","isSourceBranch":true,"state":"MERGED","url":"https://github.com/elastic/kibana/pull/250772","number":250772,"mergeCommit":{"message":"[@kbn/scout-{oblt,search,security}] Update Solutions API tests to use API `expect` (#250772)\n\n## Summary\n\nUpdates Solutions API tests to use the dedicated API `expect` from\n`@kbn/scout/api` and adds an ESLint rule to enforce correct import\npaths.\n\n### Changes\n\n- Added `api.ts` exports for `@kbn/scout-oblt`, `@kbn/scout-search`, and\n`@kbn/scout-security` packages\n- Updated solutions API tests to import `expect` from\n`@kbn/scout-oblt/api`\n- Changed assertions from `toBeTruthy()`/`toBeFalsy()` to explicit\n`toBe(true)`/`toBe(false)`\n- Refactored stack trace handling to use native\n`Error.captureStackTrace` instead of manually filtering stack lines\n- Added ESLint rule `scout_expect_import` to validate `expect` imports\nbased on test type (api/ui)","sha":"96d91d8d67257f7cddcc67fa861c0fd5a27b942c"}},{"url":"https://github.com/elastic/kibana/pull/250877","number":250877,"branch":"9.3","state":"OPEN"}]}] BACKPORT--> --------- Co-authored-by: kibanamachine <42973632+kibanamachine@users.noreply.github.com>
hannahbrooks
pushed a commit
to hannahbrooks/kibana
that referenced
this pull request
Jan 30, 2026
… API `expect` (elastic#250772) ## Summary Updates Solutions API tests to use the dedicated API `expect` from `@kbn/scout/api` and adds an ESLint rule to enforce correct import paths. ### Changes - Added `api.ts` exports for `@kbn/scout-oblt`, `@kbn/scout-search`, and `@kbn/scout-security` packages - Updated solutions API tests to import `expect` from `@kbn/scout-oblt/api` - Changed assertions from `toBeTruthy()`/`toBeFalsy()` to explicit `toBe(true)`/`toBe(false)` - Refactored stack trace handling to use native `Error.captureStackTrace` instead of manually filtering stack lines - Added ESLint rule `scout_expect_import` to validate `expect` imports based on test type (api/ui)
hannahbrooks
pushed a commit
to hannahbrooks/kibana
that referenced
this pull request
Jan 30, 2026
## Summary A combination of elastic#250566 + elastic#250772 caused a lint issue, then an import issue on main.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.

Summary
Updates Solutions API tests to use the dedicated API
expectfrom@kbn/scout/apiand adds an ESLint rule to enforce correct import paths.Changes
api.tsexports for@kbn/scout-oblt,@kbn/scout-search, and@kbn/scout-securitypackagesexpectfrom@kbn/scout-oblt/apitoBeTruthy()/toBeFalsy()to explicittoBe(true)/toBe(false)Error.captureStackTraceinstead of manually filtering stack linesscout_expect_importto validateexpectimports based on test type (api/ui)