Add deterministic TestDispatcher

Co-Authored-By: Conrad Irwin <conrad@zed.dev>
Co-Authored-By: Max Brunsfeld <max@zed.dev>
Co-Authored-By: Kyle Caverly <kyle@zed.dev>
This commit is contained in:
Antonio Scandurra 2023-10-25 17:33:16 +02:00
parent 437d147935
commit 3566d920c5
10 changed files with 372 additions and 198 deletions

View file

@ -39,9 +39,9 @@ impl App {
Self::new(current_platform(), asset_source, http_client)
}
#[cfg(any(test, feature = "test"))]
pub fn test() -> Self {
let platform = Arc::new(super::TestPlatform::new());
#[cfg(any(test, feature = "test-support"))]
pub fn test(seed: u64) -> Self {
let platform = Arc::new(crate::TestPlatform::new(seed));
let asset_source = Arc::new(());
let http_client = util::http::FakeHttpClient::with_404_response();
Self::new(platform, asset_source, http_client)