use std::env;
use insta::{assert_snapshot, glob};
use react_estree::SourceType;
use react_hermes_parser::parse;
#[test]
fn fixtures() {
glob!("fixtures/**.js", |path| {
println!("fixture {}", path.to_str().unwrap());
let input = std::fs::read_to_string(path).unwrap();
let mut ast = parse(&input, path.to_str().unwrap()).unwrap();
ast.source_type = SourceType::Script;
let output = serde_json::to_string_pretty(&ast).unwrap();
let output = output.trim();
assert_snapshot!(format!("Input:\n{input}\n\nOutput:\n{output}"));
});
}