Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[Feature Request] Allow arbitrary setup/teardown code for the Wai Application #11

Open
donatello opened this issue Feb 17, 2022 · 2 comments

Comments

@donatello
Copy link

I have a situation where to create an instance of the Wai Application, I need to run an action:

mkApp :: IO Application
mkApp = do 
  -- allocate database pool (or something else)
  pool <- mkPool
  someApp pool

Currently there seems to be no way to test this application with tasty-wai as testWai does not allow such setup.

Is this a reasonable feature request to add? Something like:

testWaiWith :: IO Application -> IO () -> TestName -> Session () -> TestTree
testWaiWith acquireApp releaseApp testName $ do ...

Is there a recommended way to do this in a different way if this feature does not make sense?

@gwils
Copy link
Member

gwils commented Feb 18, 2022

I have no intention to add any functionality to this library, and the only maintenance I intend to do is cabal metadata revisions and maybe new releases when necessary.
Maybe @mankyKitty is interested in maintaining it, but otherwise we might need to look into handing it over to someone.

@jonathanmoregard
Copy link

jonathanmoregard commented Jul 19, 2023

This seems related to my PR: #16. I don't know the current maintenance state of this package, but feel free to use my fork if you still need this functionality @donatello

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants