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

cannot use beforeAll #2

Closed
srghma opened this issue Oct 10, 2024 · 2 comments · Fixed by #4
Closed

cannot use beforeAll #2

srghma opened this issue Oct 10, 2024 · 2 comments · Fixed by #4

Comments

@srghma
Copy link

srghma commented Oct 10, 2024

2024-10-10-12pm-18-27-screenshot

https://github.com/purescript-contrib/chnglg/blob/e1f385dc41934cf4711ef8e12add2c1e8c9ef77e/test/Test/Main.purs#L123

main :: Effect Unit
main = runAff_ (either throwException pure) do
  void $ join $ runSpecAndExitProcess' ({ defaultConfig: defaultConfig { timeout = Just $ Milliseconds 20_000.0 }, parseCLIOptions: true }) [ consoleReporter ] $ sequential spec


  describe "Update command" do
    aroundAll cloneTestRepo cleanupTestRepo do
      after_ gitCleanReset do


aroundAll
  :: forall m g i a
   . MonadEffect m
  => MonadAff g
  => MonadError Error g
  => g i
  -> (i → g Unit)
  -> SpecT g i m a
  -> SpecT g Unit m a
aroundAll setup cleanup use =
  beforeAll setup $ afterAll cleanup $ use
srghma added a commit to srghma/purescript-spec-node that referenced this issue Oct 10, 2024
srghma added a commit to srghma/purescript-spec-node that referenced this issue Oct 10, 2024
@fsoikin
Copy link
Member

fsoikin commented Oct 10, 2024

Hey @srghma, could you please provide a coherent description of what the problem actually is?

@srghma
Copy link
Author

srghma commented Oct 10, 2024

@fsoikin problem is that lib currently can accept only Spec Unit, which is tree creator is Identity, but beforeAll here https://github.com/purescript-contrib/chnglg/blob/e1f385dc41934cf4711ef8e12add2c1e8c9ef77e/test/Test/Main.purs#L123 requires tree creator is Aff

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

Successfully merging a pull request may close this issue.

2 participants