tasty-focus: Simple focus mechanism for tasty

[ bsd3, library, testing ] [ Propose Tags ]

Simple focus mechanism for tasty, similar to hspec.

[Skip to Readme]
Versions [RSS] [faq] 1.0.0, 1.0.1
Change log CHANGELOG.md
Dependencies base (>=4.9 && <5), tagged, tasty [details]
License BSD-3-Clause
Copyright 2020 Jonas Carpay
Author Jonas Carpay
Maintainer Jonas Carpay <jonascarpay@gmail.com>
Category Testing
Home page https://github.com/jonascarpay/tasty-focus#readme
Source repo head: git clone git://github.com/jonascarpay/tasty-focus
Uploaded by jonascarpay at 2020-12-28T07:02:20Z
Distributions LTSHaskell:1.0.1, NixOS:1.0.1, Stackage:1.0.1
Downloads 310 total (14 in the last 30 days)
Rating (no votes yet) [estimated by Bayesian average]
Your Rating
  • λ
  • λ
  • λ
Status Hackage Matrix CI
Docs available [build log]
Last success reported on 2020-12-28 [all 1 reports]


[Index] [Quick Jump]


Maintainer's Corner

For package maintainers and hackage trustees


Readme for tasty-focus-1.0.1

[back to package description]


tasty-focus on hackage tasty-focus on Stackage Nightly

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.

The intended use case is similar to --pattern, but for quick ghcid-based feedback loops. Using focus will throw a deprecation warning, so that together with -Werror you can check that you don't accidentally leave tests focused on CI.


In this example, only barTests will run. Removing either focus or withFocus will run the entire tree again.

main :: IO ()
main = defaultMain . withFocus $
  testGroup "tests"
    [ fooTests
    , testGroup "subgroup"
      [ focus barTests
      , bazTests
	, quuxTests