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