Skip to content

Commit

Permalink
test: add test for not parsable patterns
Browse files Browse the repository at this point in the history
  • Loading branch information
Arian8j2 committed Jan 7, 2025
1 parent a977855 commit f593bdd
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 0 deletions.
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
language json

pattern some_pattern($target_dep, $target_version) {
or {
`$key: $value` where {
$key <: `"$target_dep"`,
no_meta_variable => `"$target_version"`
},
}
}
1 change: 1 addition & 0 deletions crates/cli_bin/tests/format.rs
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,7 @@ fn format_patterns_with_rewrite() -> Result<()> {
output.status.success(),
"Command didn't finish successfully"
);
assert_eq!(output.stderr, b"couldn't format '.grit/patterns/not_parsable.grit': biome couldn't parse: Expected a predicate here.\n");

let yaml_file_content = std::fs::read_to_string(grit_dir.join(".grit/grit.yaml"))?;
let test_move_import_file_content =
Expand Down

0 comments on commit f593bdd

Please sign in to comment.