Register Markdown language in some tests to silence error logs (#13066)

This PR registers the Markdown language in some of the tests in the
`zed` crate to silence the error logs about the language not being found
when the chat panel attempts to load it.

Release Notes:

- N/A
This commit is contained in:
Marshall Bowers 2024-06-14 15:29:20 -04:00 committed by GitHub
parent 45ae0dcc2d
commit 9bc3c6810b
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
4 changed files with 50 additions and 6 deletions

View file

@ -1,4 +1,4 @@
use anyhow::Result;
use anyhow::{Context, Result};
use channel::{ChannelChat, ChannelStore, MessageParams};
use client::{UserId, UserStore};
use collections::HashSet;
@ -133,7 +133,7 @@ impl MessageEditor {
let markdown = language_registry.language_for_name("Markdown");
cx.spawn(|_, mut cx| async move {
let markdown = markdown.await?;
let markdown = markdown.await.context("failed to load Markdown language")?;
buffer.update(&mut cx, |buffer, cx| {
buffer.set_language(Some(markdown), cx)
})