use std::cell::*;
use std::rc::*;
use wasm_bindgen_futures::spawn_local;
use wasm_bindgen_test::*;
use crate::utils::*;
#[wasm_bindgen_test]
async fn test_request_animation_frame_async() {
request_animation_frame().await;
}
#[wasm_bindgen_test]
async fn test_async_in_correct_order() {
let cell = Rc::new(RefCell::new(vec![]));
spawn_local({
clone!(cell);
async move {
request_animation_frame().await;
cell.borrow_mut().push("1");
}
});
request_animation_frame().await;
cell.borrow_mut().push("2");
request_animation_frame().await;
assert_eq!(vec!["2", "1"], *cell.borrow());
}