Make TestAppContext and its dependencies available only in tests

Co-Authored-By: Nathan Sobo <nathan@zed.dev>
This commit is contained in:
Antonio Scandurra 2022-03-01 17:01:52 +01:00
parent 0d6f6bf5bb
commit 83a3402235
7 changed files with 161 additions and 98 deletions

View file

@ -86,10 +86,13 @@ pub fn run_test(
deterministic.clone(),
seed,
is_last_iteration,
)
);
});
cx.update(|cx| cx.remove_all_windows());
deterministic.run_until_parked();
cx.update(|_| {}); // flush effects
leak_detector.lock().detect();
if is_last_iteration {
break;