1
0
Fork 0
mirror of https://github.com/denoland/deno.git synced 2024-11-21 15:04:11 -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:
David Sherret 2024-03-15 13:27:52 -04:00 committed by GitHub
parent ce768bac83
commit 392579b5a6
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
11 changed files with 9 additions and 1 deletions

View file

@ -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