test(parser): fix incorrect flow error test

This commit is contained in:
Boshen 2024-08-28 20:50:00 +08:00
parent fb75d2576b
commit 70091771b6
No known key found for this signature in database
GPG key ID: 9C7A8C8AB22BEBD1

View file

@ -457,11 +457,10 @@ mod test {
*/
asdf asdf
",
"/* @flow */ let a; let a;",
"/* @flow */ super;",
];
for source in sources {
let ret = Parser::new(&allocator, source, source_type).parse();
assert!(ret.program.is_empty());
assert_eq!(ret.errors.len(), 1);
assert_eq!(ret.errors.first().unwrap().to_string(), "Flow is not supported");
}