sandwich-slack 0.1.0.6 → 0.1.1.0
raw patch · 6 files changed
+23/−5 lines, 6 filesPVP ok
version bump matches the API change (PVP)
API changes (from Hackage documentation)
+ Test.Sandwich.Formatters.Slack: data SlackFormatter
Files
- CHANGELOG.md +5/−0
- LICENSE +1/−1
- app/Main.hs +9/−1
- sandwich-slack.cabal +3/−3
- src/Test/Sandwich/Formatters/Slack.hs +1/−0
- src/Test/Sandwich/Formatters/Slack/Internal/Markdown.hs +4/−0
CHANGELOG.md view
@@ -2,6 +2,11 @@ ## Unreleased changes +## 0.1.1.0++* Windows support.+* Export SlackFormatter type+ ## 0.1.0.6 * Relax base bound so we can build on GHC 9
LICENSE view
@@ -1,4 +1,4 @@-Copyright Tom McLaughlin (c) 2021+Copyright Tom McLaughlin (c) 2022 All rights reserved.
app/Main.hs view
@@ -1,4 +1,5 @@ {-# LANGUAGE OverloadedStrings #-}+{-# LANGUAGE CPP #-} module Main where @@ -9,8 +10,12 @@ import Test.Sandwich import Test.Sandwich.Formatters.Print import Test.Sandwich.Formatters.Slack++#ifndef mingw32_HOST_OS import Test.Sandwich.Formatters.TerminalUI+#endif + simple :: TopSpec simple = parallel $ do it "does the thing 1" sleepThenSucceed@@ -37,8 +42,11 @@ , slackFormatterVisibilityThreshold = Just 50 } +#ifndef mingw32_HOST_OS baseFormatter = SomeFormatter defaultTerminalUIFormatter--- baseFormatter = SomeFormatter defaultPrintFormatter+#else+baseFormatter = SomeFormatter defaultPrintFormatter+#endif main :: IO () main = runSandwich options simple
sandwich-slack.cabal view
@@ -4,10 +4,10 @@ -- -- see: https://github.com/sol/hpack ----- hash: 50f2c0f77f15237db2d29e2b36e0b9a3a2d553043aeeb460cd7fe04012530a42+-- hash: 422cdfb1fbcf3689b33a4017ebe648ea8705988b81842a18176a442681037e9d name: sandwich-slack-version: 0.1.0.6+version: 0.1.1.0 synopsis: Sandwich integration with Slack description: Please see the <https://codedownio.github.io/sandwich/docs/extensions/sandwich-slack documentation>. category: Testing@@ -15,7 +15,7 @@ bug-reports: https://github.com/codedownio/sandwich/issues author: Tom McLaughlin maintainer: tom@codedown.io-copyright: 2021 Tom McLaughlin+copyright: 2022 Tom McLaughlin license: BSD3 license-file: LICENSE build-type: Simple
src/Test/Sandwich/Formatters/Slack.hs view
@@ -13,6 +13,7 @@ module Test.Sandwich.Formatters.Slack ( defaultSlackFormatter+ , SlackFormatter -- * Options , slackFormatterSlackConfig
src/Test/Sandwich/Formatters/Slack/Internal/Markdown.hs view
@@ -2,6 +2,7 @@ {-# LANGUAGE QuasiQuotes #-} {-# LANGUAGE RecordWildCards #-} {-# LANGUAGE ViewPatterns #-}+{-# LANGUAGE CPP #-} module Test.Sandwich.Formatters.Slack.Internal.Markdown where @@ -16,6 +17,9 @@ toMarkdown :: FailureReason -> T.Text toMarkdown (Reason {..}) = T.pack failureReason+#ifndef mingw32_HOST_OS+toMarkdown (RawImage {..}) = T.pack failureFallback+#endif toMarkdown (ChildrenFailed {failureNumChildren=n}) = [i|#{n} #{if n == 1 then ("child" :: T.Text) else "children"} failed|] toMarkdown (ExpectedButGot {..}) = [i|Expected *#{failureValue1}* but got *#{failureValue2}*|] toMarkdown (DidNotExpectButGot {..}) = [i|Did not expect *#{failureValue1}*|]