Skip to content

example of do notation? #6

@cakekindel

Description

@cakekindel

Hi again, I'm having issues with the way do notation is compiled as tests, wondering if this is an issue or if there's something i could be doing differently

--| ```purescript run
--| > import Effect.Unsafe (unsafePerformEffect)
--| > import Effect.Console (log)
--| > unsafePerformEffect $ do
--|                           log "help!"
--|                           mempty
--| unit
--| ```
foo = "bar"

compiles to invalid test code:

main :: Spec Unit
main = describe "Test.DocTest.Effect.Worker" $ do
    it "value spec in docs from: sendMsg" $ show (unsafePerformEffect $ do log "help!"
                             mempty) `shouldEqual` "unit"

    pure unit

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions