Skip to content

Commit

Permalink
Add daemon unit tests.
Browse files Browse the repository at this point in the history
  • Loading branch information
nojaf committed Oct 19, 2021
1 parent b40a46e commit cb929bb
Show file tree
Hide file tree
Showing 3 changed files with 267 additions and 343 deletions.
5 changes: 2 additions & 3 deletions src/Fantomas.Client/LSPFantomasServiceTypes.fs
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
module Fantomas.Client.LSPFantomasServiceTypes

open System
open StreamJsonRpc
open Fantomas.Client.Contracts

Expand All @@ -18,7 +17,7 @@ type FantomasResponseCode =
[<RequireQualifiedAccess>]
type FormatSelectionResponse =
| Formatted of filename: string * formattedContent: string
| Error of filename: string * formattingError: Exception
| Error of filename: string * formattingError: string

member this.AsFormatResponse() =
match this with
Expand All @@ -29,7 +28,7 @@ type FormatSelectionResponse =
| FormatSelectionResponse.Error (name, ex) ->
{ Code = int FantomasResponseCode.Error
FilePath = name
Content = Some(ex.Message) }
Content = Some ex }

[<RequireQualifiedAccess>]
type FormatDocumentResponse =
Expand Down
Loading

0 comments on commit cb929bb

Please sign in to comment.