language: Fix flaky bracket range deduplication test (#62996)
Noticed this in [this CI run](https://github.com/zed-industries/zed/actions/runs/32452508104/job/96683569873?pr=62989). The test now waits for parsing before taking its snapshot. Release Notes: - N/A
This commit is contained in:
1 parent
ebda84052f
commit
f572681d14
1 file changed
+5
-2
@@ -1666,7 +1666,7 @@ fn test_bracket_ranges_keep_pairs_straddling_a_chunk_boundary_amid_errors(cx: &m
|
||||
}
|
||||
|
||||
#[gpui::test]
|
||||
fn test_bracket_ranges_deduplicate_overlapping_patterns(cx: &mut App) {
|
||||
async fn test_bracket_ranges_deduplicate_overlapping_patterns(cx: &mut TestAppContext) {
|
||||
let text = indoc! {r#"
|
||||
CLAY(CLAY_ID("MenuContainer"),
|
||||
CLAY_RECTANGLE({.color = {43, 41, 51, 255}}),
|
||||
@@ -1693,7 +1693,10 @@ fn test_bracket_ranges_deduplicate_overlapping_patterns(cx: &mut App) {
|
||||
.unwrap(),
|
||||
);
|
||||
let buffer = cx.new(|cx| Buffer::local(text, cx).with_language(language, cx));
|
||||
let snapshot = buffer.read(cx).snapshot();
|
||||
buffer
|
||||
.read_with(cx, |buffer, _| buffer.parsing_idle())
|
||||
.await;
|
||||
let snapshot = buffer.read_with(cx, |buffer, _| buffer.snapshot());
|
||||
assert_has_syntax_errors(&snapshot);
|
||||
|
||||
let mut matches = snapshot
|
||||
|
||||
Reference in new issue
Block a user