feat(cli): verify assertions for every carat in tests, not just the first one
Co-authored-by: Amaan Qureshi <amaanq12@gmail.com>
This commit is contained in:
parent
473f0a1a4d
commit
e445532a1f
5 changed files with 40 additions and 19 deletions
|
|
@ -23,7 +23,7 @@ fn test_highlight_test_with_basic_test() {
|
|||
"// hi",
|
||||
"var abc = function(d) {",
|
||||
" // ^ function",
|
||||
" // ^ keyword",
|
||||
" // ^^^ keyword",
|
||||
" return d + e;",
|
||||
" // ^ variable",
|
||||
" // ^ !variable",
|
||||
|
|
@ -39,12 +39,12 @@ fn test_highlight_test_with_basic_test() {
|
|||
assert_eq!(
|
||||
assertions,
|
||||
&[
|
||||
Assertion::new(1, 5, false, String::from("function")),
|
||||
Assertion::new(1, 11, false, String::from("keyword")),
|
||||
Assertion::new(4, 9, false, String::from("variable")),
|
||||
Assertion::new(4, 11, true, String::from("variable")),
|
||||
Assertion::new(8, 5, false, String::from("function")),
|
||||
Assertion::new(8, 11, false, String::from("keyword")),
|
||||
Assertion::new(1, 5, 1, false, String::from("function")),
|
||||
Assertion::new(1, 11, 3, false, String::from("keyword")),
|
||||
Assertion::new(4, 9, 1, false, String::from("variable")),
|
||||
Assertion::new(4, 11, 1, true, String::from("variable")),
|
||||
Assertion::new(8, 5, 1, false, String::from("function")),
|
||||
Assertion::new(8, 11, 1, false, String::from("keyword")),
|
||||
]
|
||||
);
|
||||
|
||||
|
|
|
|||
|
|
@ -30,10 +30,10 @@ fn test_tags_test_with_basic_test() {
|
|||
assert_eq!(
|
||||
assertions,
|
||||
&[
|
||||
Assertion::new(1, 4, false, String::from("definition.function")),
|
||||
Assertion::new(3, 9, false, String::from("reference.call")),
|
||||
Assertion::new(5, 11, false, String::from("reference.call")),
|
||||
Assertion::new(5, 13, true, String::from("variable.parameter")),
|
||||
Assertion::new(1, 4, 1, false, String::from("definition.function")),
|
||||
Assertion::new(3, 9, 1, false, String::from("reference.call")),
|
||||
Assertion::new(5, 11, 1, false, String::from("reference.call")),
|
||||
Assertion::new(5, 13, 1, true, String::from("variable.parameter")),
|
||||
]
|
||||
);
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue