diff options
| author | Ogulcan Celik <ogulcancelik@gmail.com> | 2026-06-16 18:25:02 +0300 |
|---|---|---|
| committer | Ogulcan Celik <ogulcancelik@gmail.com> | 2026-06-16 18:25:02 +0300 |
| commit | 5ffaf4f32b299bd904c9dbfc02e77252cbfb0220 (patch) | |
| tree | 698bf736a4a624909820010df038e4988ad33244 /src/integration/mod.rs | |
| parent | ebff34063a55446c7390e12ec84acd2dad04ce43 (diff) | |
fix: isolate omp hook state to ui sessions
refs #614
Diffstat (limited to 'src/integration/mod.rs')
| -rw-r--r-- | src/integration/mod.rs | 23 |
1 files changed, 23 insertions, 0 deletions
diff --git a/src/integration/mod.rs b/src/integration/mod.rs index d4c7265b..59eaebd9 100644 --- a/src/integration/mod.rs +++ b/src/integration/mod.rs @@ -6035,6 +6035,29 @@ mod tests { } #[test] + fn omp_root_session_guard_is_instance_scoped() { + let export_start = OMP_EXTENSION_ASSET + .find("export default function (pi)") + .expect("omp extension exports a function"); + let root_session_decl = OMP_EXTENSION_ASSET + .find("let rootSession = false") + .expect("omp extension declares root session guard"); + let session_start_handler = OMP_EXTENSION_ASSET + .find("pi.on(\"session_start\"") + .expect("omp extension registers session_start handler"); + + assert_eq!( + OMP_EXTENSION_ASSET + .matches("let rootSession = false") + .count(), + 1 + ); + assert!(OMP_EXTENSION_ASSET.contains("rootSession = ctx?.hasUI === true")); + assert!(export_start < root_session_decl); + assert!(root_session_decl < session_start_handler); + } + + #[test] fn install_qodercli_writes_hook_and_updates_settings() { let _lock = integration_env_lock(); let base = unique_base(); |
