mirror of
https://github.com/denoland/deno
synced 2024-08-25 02:57:22 +00:00
chore(specs): use jsonc for metadata file (#22946)
Avoids the comment diagnostic that vscode gives. Also, automatically renames .json to .jsonc for the time being.
This commit is contained in:
parent
ce768bac83
commit
392579b5a6
|
@ -282,7 +282,15 @@ fn collect_tests() -> Vec<TestCategory> {
|
|||
}
|
||||
|
||||
let test_dir = PathRef::new(entry.path());
|
||||
let metadata_path = test_dir.join("__test__.json");
|
||||
let metadata_path = test_dir.join("__test__.jsonc");
|
||||
if !metadata_path.is_file() {
|
||||
let json_path = test_dir.join("__test__.json");
|
||||
if json_path.is_file() {
|
||||
// automatically rename to jsonc
|
||||
json_path.rename(&metadata_path);
|
||||
}
|
||||
}
|
||||
|
||||
let metadata_value = metadata_path.read_jsonc_value();
|
||||
// checking for "steps" leads to a more targeted error message
|
||||
// instead of when deserializing an untagged enum
|
||||
|
|
Loading…
Reference in a new issue