Skip to content

[9.3] [@kbn/scout-{oblt,search,security}] Update Solutions API tests to use API expect (#250772)#250877

Merged
kibanamachine merged 2 commits intoelastic:9.3from
kibanamachine:backport/9.3/pr-250772
Jan 29, 2026
Merged

[9.3] [@kbn/scout-{oblt,search,security}] Update Solutions API tests to use API expect (#250772)#250877
kibanamachine merged 2 commits intoelastic:9.3from
kibanamachine:backport/9.3/pr-250772

Conversation

@kibanamachine
Copy link
Copy Markdown
Contributor

Backport

This will backport the following commits from main to 9.3:

Questions ?

Please refer to the Backport tool documentation

… 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)
@kibanamachine kibanamachine merged commit 3b8bd06 into elastic:9.3 Jan 29, 2026
13 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

backport This PR is a backport of another PR

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants