add tests module snippet

Signed-off-by: Benjamin Coenen <5719034+bnjjj@users.noreply.github.com>
This commit is contained in:
Benjamin Coenen 2020-05-11 18:11:23 +02:00
parent 05399250d4
commit 4e54b1ca46

View file

@ -33,6 +33,24 @@ pub(super) fn complete_item_snippet(acc: &mut Completions, ctx: &CompletionConte
None => return,
};
snippet(
ctx,
cap,
"Test module",
"\
#[cfg(test)]
mod tests {
use super::*;
#[test]
fn ${1:test_name}() {
$0
}
}",
)
.lookup_by("tmod")
.add_to(acc);
snippet(
ctx,
cap,