mirror of
https://github.com/denoland/deno.git
synced 2024-11-24 15:19:26 -05: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
11 changed files with 9 additions and 1 deletions
|
@ -282,7 +282,15 @@ fn collect_tests() -> Vec<TestCategory> {
|
||||||
}
|
}
|
||||||
|
|
||||||
let test_dir = PathRef::new(entry.path());
|
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();
|
let metadata_value = metadata_path.read_jsonc_value();
|
||||||
// checking for "steps" leads to a more targeted error message
|
// checking for "steps" leads to a more targeted error message
|
||||||
// instead of when deserializing an untagged enum
|
// instead of when deserializing an untagged enum
|
||||||
|
|
Loading…
Reference in a new issue