tasty-focus 1.0.0 → 1.0.1
raw patch · 4 files changed
+32/−3 lines, 4 filesPVP ok
version bump matches the API change (PVP)
API changes (from Hackage documentation)
Files
- CHANGELOG.md +6/−0
- README.md +2/−0
- src/Test/Tasty/Focus.hs +17/−2
- tasty-focus.cabal +7/−1
CHANGELOG.md view
@@ -1,5 +1,11 @@ # Changelog +## 1.0.1++### [Changed]+- Expanded haddocks+- Added missing fields to cabal file+ ## 1.0.0 ### [Added]
README.md view
@@ -1,4 +1,6 @@ ## tasty-focus+[](http://hackage.haskell.org/package/tasty-focus)+[](https://stackage.org/nightly/package/tasty-focus) Simple focus mechanism for `tasty`, similar to `hspec`.
src/Test/Tasty/Focus.hs view
@@ -1,6 +1,19 @@ -- | Simple focus mechanism for @tasty@, similar to @hspec@. -- Mark the root of your test tree with 'withFocus'. -- Then, if any of the subtrees of your test suite are marked with 'focus', only those test trees will be run.+--+-- @+-- main = defaultMain . 'withFocus' $+-- testGroup "tests"+-- [ fooTests+-- , testGroup "subgroup"+-- [ 'focus' barTests+-- , bazTests+-- ]+-- , quuxTests+-- ]+-- @+ module Test.Tasty.Focus ( withFocus, focus,@@ -29,8 +42,6 @@ Focused -> True NotFocused -> False -{-# WARNING focus "Focusing tests... don't forget to re-enable your entire test suite!" #-}- -- | Intended to be used at the root of your test suite. -- If any of the subtrees are focused, filter out all non-focused subtrees. -- If there are no focused subtrees, return the entire tree.@@ -47,8 +58,12 @@ go (After d e t) = After d e (go t) -- | Marks the tree as focused, as long as none of its subtrees are focused.+--+-- This funcion is marked as deprecated so that @-Werror@ will catch it if you accidentally leave tests focused. focus :: TestTree -> TestTree focus tree = if anyFocused tree then tree else testGroup "focused" [PlusTestOptions (setOption Focused) tree]++{-# WARNING focus "Focusing tests... don't forget to re-enable your entire test suite!" #-}
tasty-focus.cabal view
@@ -1,18 +1,24 @@ cabal-version: 2.4 name: tasty-focus-version: 1.0.0+version: 1.0.1 license: BSD-3-Clause build-type: Simple license-file: LICENSE author: Jonas Carpay maintainer: Jonas Carpay <jonascarpay@gmail.com>+category: Testing copyright: 2020 Jonas Carpay tested-with: GHC ==8.10.2 synopsis: Simple focus mechanism for tasty+homepage: https://github.com/jonascarpay/tasty-focus#readme description: Simple focus mechanism for tasty, similar to hspec. extra-doc-files: CHANGELOG.md README.md++source-repository head+ type: git+ location: git://github.com/jonascarpay/tasty-focus common common-options build-depends: base >=4.9 && <5