We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 0509d97 commit b8bb712Copy full SHA for b8bb712
tests/FsToolkit.ErrorHandling.Tests/TestHelpers.fs
@@ -5,15 +5,26 @@ module Async =
5
6
open System
7
8
+#if FABLE_COMPILER && FABLE_COMPILER_JAVASCRIPT
9
+ open Fable.Core
10
+
11
+ /// An Async that never completes but can be cancelled
12
+ let never<'a> : Async<'a> =
13
+ Fable.Core.JS.Constructors.Promise.Create(fun _ _ -> ())
14
+ |> Async.AwaitPromise
15
+#else
16
/// An Async that never completes but can be cancelled
17
let never<'a> : Async<'a> =
18
+ let granularity = TimeSpan.FromSeconds 3.
19
20
let rec loop () =
21
async {
- do! Async.Sleep(TimeSpan.FromHours 1)
22
+ do! Async.Sleep(granularity)
23
return! loop ()
24
}
25
26
loop ()
27
+#endif
28
29
module TestHelpers =
30
let makeDisposable (callback) =
0 commit comments