use crate::syntax::{ast::node::AsyncFunctionDecl, parser::tests::check_parser};
#[test]
fn async_function_declaration() {
check_parser(
"async function hello() {}",
vec![AsyncFunctionDecl::new(Box::from("hello"), vec![], vec![]).into()],
);
}
#[test]
fn async_function_declaration_keywords() {
check_parser(
"async function yield() {}",
vec![AsyncFunctionDecl::new(Box::from("yield"), vec![], vec![]).into()],
);
check_parser(
"async function await() {}",
vec![AsyncFunctionDecl::new(Box::from("await"), vec![], vec![]).into()],
);
}