Git Product home page Git Product logo

Comments (10)

wclr avatar wclr commented on June 16, 2024

@fsoikin ping

from purescript-spec.

fsoikin avatar fsoikin commented on June 16, 2024

I don't quite understand what the problem is. Can't you just create your own alias type Spec = SpecT Aff Unit Effect Unit?

from purescript-spec.

wclr avatar wclr commented on June 16, 2024

The problem is: why this is not by default in the library.

The problem is not with the alias, I described it, if one uses beforeAll hook one cannot run it simply with:

launchAff_ $ runSpec [ consoleReporter ] spec

but need:

launchAff_ =<< void <$> runSpecT defaultConfig [ consoleReporter ] spec

Do you use beforeAll hook in tests?

from purescript-spec.

fsoikin avatar fsoikin commented on June 16, 2024

Ah, I think I see: you're complaining that beforeAll requires the base monad to be MonadEffect, right?

If so, I cannot answer your question: I did not write this library, so I don't know the original motivation.

from purescript-spec.

wclr avatar wclr commented on June 16, 2024

so I don't know the original motivation.

Maybe it was overlooked. This change doesn't seem to break anything.

I thought you were the last active maintainer -) Who should we ping? @safareli

from purescript-spec.

safareli avatar safareli commented on June 16, 2024

Haven't done any PureScript for past couple years...

from purescript-spec.

wclr avatar wclr commented on June 16, 2024

Haven't done any PureScript for past couple years...

So far we need a brave one. @fsoikin ?

from purescript-spec.

fsoikin avatar fsoikin commented on June 16, 2024

Ok, so after considering this for a bit, I think I don't want to replace Identity with Effect, because this would impact existing tests that might count on the purity of the base monad.

In practice using beforeAll requires only very few changes to the code - the type of specs and the entry point, - so really the missing part is a comment on beforeAll explaining the issue and describing the solution.

And if you really want to have the Effect-based tests supported by the core library - how about creating a parallel type alias (e.g. SpecEff or something) and entry point function (runSpecEff)?

from purescript-spec.

wclr avatar wclr commented on June 16, 2024

SpecEff looks too ad-hoc. How about naming it SpecE and runSpecE for the sake of brevity?

from purescript-spec.

fsoikin avatar fsoikin commented on June 16, 2024

SpecE reads like it has to do with errors.

from purescript-spec.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.