Convert some project tests to use FakeFs

Also, tweak some FakeFs methods to make them slightly more convenient.
This commit is contained in:
Max Brunsfeld 2022-02-17 11:09:27 -08:00
parent 4b0b97f773
commit 6d8db5f6bb
8 changed files with 89 additions and 116 deletions

View file

@ -492,7 +492,7 @@ pub struct WorkspaceParams {
impl WorkspaceParams {
#[cfg(any(test, feature = "test-support"))]
pub fn test(cx: &mut MutableAppContext) -> Self {
let fs = Arc::new(project::FakeFs::new(cx.background().clone()));
let fs = project::FakeFs::new(cx.background().clone());
let languages = Arc::new(LanguageRegistry::new());
let http_client = client::test::FakeHttpClient::new(|_| async move {
Ok(client::http::ServerResponse::new(404))