diff --git a/src/FsAutoComplete.Core/TestAdapter.fs b/src/FsAutoComplete.Core/TestAdapter.fs index 69632df6b..6c84de932 100644 --- a/src/FsAutoComplete.Core/TestAdapter.fs +++ b/src/FsAutoComplete.Core/TestAdapter.fs @@ -142,7 +142,8 @@ let getExpectoTests (ast: ParsedInput) : TestAdapterEntry list = visitExpr entry expr2 | Case, SynExpr.ComputationExpr _ | Case, SynExpr.Lambda _ - | Case, SynExpr.Paren(SynExpr.Lambda _, _, _, _) -> + | Case, SynExpr.Paren(expr=SynExpr.App(argExpr = SynExpr.ComputationExpr _)) + | Case, SynExpr.Paren(expr = (SynExpr.Lambda _)) -> ident <- ident + 1 let entry = diff --git a/test/FsAutoComplete.Tests.Lsp/DetectUnitTests.fs b/test/FsAutoComplete.Tests.Lsp/DetectUnitTests.fs index a2fcf7de7..a958a9045 100644 --- a/test/FsAutoComplete.Tests.Lsp/DetectUnitTests.fs +++ b/test/FsAutoComplete.Tests.Lsp/DetectUnitTests.fs @@ -55,5 +55,5 @@ let tests state = (async { let! testNotification = getTestNotification "ExpectoTests" "Sample.fs" Expect.hasLength testNotification.Tests 1 "Expected to have found 1 expecto test list" - Expect.hasLength testNotification.Tests.[0].Childs 13 "Expected to have found 13 expecto tests" + Expect.hasLength testNotification.Tests.[0].Childs 15 "Expected to have found 13 expecto tests" }) ] diff --git a/test/FsAutoComplete.Tests.Lsp/TestCases/ExpectoTests/Sample.fs b/test/FsAutoComplete.Tests.Lsp/TestCases/ExpectoTests/Sample.fs index 3f1c27766..dd0e0670f 100644 --- a/test/FsAutoComplete.Tests.Lsp/TestCases/ExpectoTests/Sample.fs +++ b/test/FsAutoComplete.Tests.Lsp/TestCases/ExpectoTests/Sample.fs @@ -44,6 +44,14 @@ let tests = Expect.equal 4 (2+2) "2+2" } + testCaseAsync "async test case backpipe" <| async { + Expect.equal 4 (2+2) "2+2" + } + + testCaseAsync "async test case paren"(async { + Expect.equal 4 (2+2) "2+2" + }) + testTheory "odd numbers" [1; 3; 5] ( fun x -> Expect.isTrue (x % 2 = 1) "should be odd" )