package async_js
Source file async_js_test.ml
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21module Expect_test_config = struct open Async_kernel module IO = Deferred open Js_of_ocaml external loop_while : (unit -> bool Js.t) Js.callback -> unit = "loop_while" let run f = let result = f () in loop_while (Js.wrap_callback (fun () -> Async_kernel_scheduler.Expert.run_cycles_until_no_jobs_remain (); Js.bool (not (Deferred.is_determined result)))); match Deferred.peek result with | Some result -> result | None -> assert false ;; let sanitize s = s let upon_unreleasable_issue = Expect_test_config.upon_unreleasable_issue end