-
Notifications
You must be signed in to change notification settings - Fork 9
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
Add e2e test for Purescript #615
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The structure looks good, I have some comments regarding handling errors.
Further, I think it would be nice if we refactor this code into reusable functions.
E.g., I am thinking of a function setupNlgEnv
which has the type Interpreted -> IO NLGEnv
, or something like that
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM, two small changes :)
must_sing_purs <- runIO $ transpileFile "must_sing" | ||
it "convert must sing to Purescript" $ goldenGeneric "must_sing" must_sing_purs |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
must_sing_purs <- runIO $ transpileFile "must_sing" | |
it "convert must sing to Purescript" $ goldenGeneric "must_sing" must_sing_purs | |
it "convert must sing to Purescript" $ do | |
must_sing_purs <- transpileFile "must_sing" | |
goldenGeneric "must_sing" must_sing_purs |
Then it is a perfect test case, imo!
putStrLn "natural4: encountered error while obtaining allNLGEnv" | ||
DF.traverse_ putStrLn allNLGEnvErrors |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
putStrLn "natural4: encountered error while obtaining allNLGEnv" | |
DF.traverse_ putStrLn allNLGEnvErrors | |
error $ unlines $ "natural4: encountered error while obtaining allNLGEnv" : allNLGEnvErrors |
@kosmikus , @fendor
As I mentioned I'm trying to set up minimal E2E testing for PS Transpiler before trying to refactor it.
As a first step I copied-and-pasted code from main just to run the transpiler without using any driver infra. Test code is very messy and can't even be used to write another test without complete copy and paste.
I was thinking maybe use driver infra but in this case should it be pulled out to other module where I can import it from?
Can you please provide your input on
I can set up a short call if it's faster to discuss over zoom.