Skip to content

Commit 4e54b1c

Browse files
committed
add tests module snippet
Signed-off-by: Benjamin Coenen <5719034+bnjjj@users.noreply.github.com>
1 parent 0539925 commit 4e54b1c

File tree

1 file changed

+18
-0
lines changed

1 file changed

+18
-0
lines changed

crates/ra_ide/src/completion/complete_snippet.rs

Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -33,6 +33,24 @@ pub(super) fn complete_item_snippet(acc: &mut Completions, ctx: &CompletionConte
3333
None => return,
3434
};
3535

36+
snippet(
37+
ctx,
38+
cap,
39+
"Test module",
40+
"\
41+
#[cfg(test)]
42+
mod tests {
43+
use super::*;
44+
45+
#[test]
46+
fn ${1:test_name}() {
47+
$0
48+
}
49+
}",
50+
)
51+
.lookup_by("tmod")
52+
.add_to(acc);
53+
3654
snippet(
3755
ctx,
3856
cap,

0 commit comments

Comments
 (0)