Skip to content

Commit f158e62

Browse files
committed
Fix more NpmTest target tests
1 parent 29ef7e0 commit f158e62

File tree

2 files changed

+5
-8
lines changed

2 files changed

+5
-8
lines changed

tests/FsToolkit.ErrorHandling.Tests/Expecto.fs

Lines changed: 4 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,6 @@
11
module Expecto
22

33
open Expecto
4-
open FsToolkit.ErrorHandling
54
open System
65
open System.Threading.Tasks
76

@@ -33,8 +32,6 @@ let ftestCaseTask name test =
3332
|> Async.AwaitTask
3433
})
3534

36-
#endif
37-
3835
module Expect =
3936
open Expecto
4037

@@ -53,22 +50,22 @@ module Expect =
5350

5451
match thrown with
5552
| Choice1Of2 e when not (typeof<'texn>.IsAssignableFrom(e.GetType())) ->
56-
failtestf
53+
Tests.failtestf
5754
"%s. Expected f to throw an exn of type %s, but one of type %s was thrown."
5855
message
5956
(typeof<'texn>.FullName)
6057
(e.GetType().FullName)
6158
| Choice1Of2 _ -> ()
62-
| Choice2Of2 result -> failtestf "%s. Expected f to throw. returned %A" message result
59+
| Choice2Of2 result -> Tests.failtestf "%s. Expected f to throw. returned %A" message result
6360
}
6461

6562
type Expect =
6663

6764
static member CancellationRequested(operation: Async<'a>) =
6865
Expect.throwsTAsync<'a, OperationCanceledException> (operation) "Should have been cancelled"
6966

70-
#if !FABLE_COMPILER
7167
static member CancellationRequested(operation: Task<_>) =
7268
Expect.CancellationRequested(Async.AwaitTask operation)
7369
|> Async.StartImmediateAsTask
74-
#endif
70+
71+
#endif

tests/FsToolkit.ErrorHandling.Tests/FsToolkit.ErrorHandling.Tests.fsproj

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,11 +9,11 @@
99
</ProjectReference>
1010
</ItemGroup>
1111
<ItemGroup>
12+
<Compile Include="Expect.fs" />
1213
<Compile Include="Expecto.fs" />
1314
<Compile Include="TestHelpers.fs" />
1415
<Compile Include="SampleDomain.fs" />
1516
<Compile Include="TestData.fs" />
16-
<Compile Include="Expect.fs" />
1717
<Compile Include="BackgroundTaskOptionCE.fs" Condition="'$(FABLE_COMPILER)' != 'true'" />
1818
<Compile Include="BackgroundTaskResultCE.fs" Condition="'$(FABLE_COMPILER)' != 'true'" />
1919
<Compile Include="TaskOption.fs" Condition="'$(FABLE_COMPILER)' != 'true'" />

0 commit comments

Comments
 (0)